Skip to content

Commit 87b646a

Browse files
committed
remove arbitrum.Config.StateScheme, pass the scheme in call to NewBackend instead
1 parent 57fe4b7 commit 87b646a

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

arbitrum/backend.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type Backend struct {
4141
filterSystem *filters.FilterSystem
4242
}
4343

44-
func NewBackend(stack *node.Node, config *Config, chainDb ethdb.Database, publisher ArbInterface, filterConfig filters.Config) (*Backend, *filters.FilterSystem, error) {
44+
func NewBackend(stack *node.Node, config *Config, chainDb ethdb.Database, publisher ArbInterface, filterConfig filters.Config, stateScheme string) (*Backend, *filters.FilterSystem, error) {
4545
backend := &Backend{
4646
arb: publisher,
4747
stack: stack,
@@ -55,7 +55,7 @@ func NewBackend(stack *node.Node, config *Config, chainDb ethdb.Database, publis
5555
chanNewBlock: make(chan struct{}, 1),
5656
}
5757

58-
scheme, err := rawdb.ParseStateScheme(config.StateScheme, chainDb)
58+
scheme, err := rawdb.ParseStateScheme(stateScheme, chainDb)
5959
if err != nil {
6060
return nil, nil, err
6161
}

arbitrum/config.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"time"
77

8-
"github.com/ethereum/go-ethereum/core/rawdb"
98
"github.com/ethereum/go-ethereum/eth/ethconfig"
109
flag "github.com/spf13/pflag"
1110
)
@@ -27,11 +26,6 @@ type Config struct {
2726
LogNoHistory bool `koanf:"log-no-history"` // No log search index is maintained.
2827
LogExportCheckpoints string `koanf:"log-export-checkpoints"` // export log index checkpoints to file
2928

30-
// State scheme represents the scheme used to store states and trie
31-
// nodes on top. It can be 'hash', 'path', or none which means use the scheme
32-
// consistent with persistent state.
33-
StateScheme string `koanf:"state-scheme"`
34-
3529
// Parameters for the filter system
3630
FilterLogCacheSize int `koanf:"filter-log-cache-size"`
3731
FilterTimeout time.Duration `koanf:"filter-timeout"`
@@ -82,7 +76,6 @@ func ConfigAddOptions(prefix string, f *flag.FlagSet) {
8276
f.Uint64(prefix+".log-history", DefaultConfig.LogHistory, "maximum number of blocks from head where a log search index is maintained")
8377
f.Bool(prefix+".log-no-history", DefaultConfig.LogNoHistory, "no log search index is maintained")
8478
f.String(prefix+".log-export-checkpoints", DefaultConfig.LogExportCheckpoints, "export log index checkpoints to file")
85-
f.String(prefix+".state-scheme", DefaultConfig.StateScheme, "state scheme used to store states and trie nodes on top")
8679
f.Uint64(prefix+".feehistory-max-block-count", DefaultConfig.FeeHistoryMaxBlockCount, "max number of blocks a fee history request may cover")
8780
f.String(prefix+".classic-redirect", DefaultConfig.ClassicRedirect, "url to redirect classic requests, use \"error:[CODE:]MESSAGE\" to return specified error instead of redirecting")
8881
f.Duration(prefix+".classic-redirect-timeout", DefaultConfig.ClassicRedirectTimeout, "timeout for forwarded classic requests, where 0 = no timeout")
@@ -120,5 +113,4 @@ var DefaultConfig = Config{
120113
TimeoutQueueBound: 512,
121114
},
122115
BlockRedirectsList: "default",
123-
StateScheme: rawdb.HashScheme,
124116
}

0 commit comments

Comments
 (0)