core/filtermaps: rename NoHistory -> Disabled

This commit is contained in:
Felix Lange 2025-03-13 13:07:39 +01:00
parent 608056a34a
commit 2131db4fd7
2 changed files with 5 additions and 5 deletions

View file

@ -168,8 +168,8 @@ type lastBlockOfMap struct {
// Config contains the configuration options for NewFilterMaps.
type Config struct {
History uint64 // number of historical blocks to index
NoHistory bool // disables indexing completely
History uint64 // number of historical blocks to index
Disabled bool // disables indexing completely
// This option enables the checkpoint JSON file generator.
// If set, the given file will be updated with checkpoint information.
@ -191,7 +191,7 @@ func NewFilterMaps(db ethdb.KeyValueStore, initView *ChainView, params Params, c
finalBlockCh: make(chan uint64, 1),
blockProcessingCh: make(chan bool, 1),
history: config.History,
noHistory: config.NoHistory,
noHistory: config.Disabled,
exportFileName: config.ExportFileName,
Params: params,
indexedRange: filterMapsRange{

View file

@ -232,8 +232,8 @@ func (ts *testSetup) setHistory(history uint64, noHistory bool) {
head := ts.chain.CurrentBlock()
view := NewChainView(ts.chain, head.Number.Uint64(), head.Hash())
config := Config{
History: history,
NoHistory: noHistory,
History: history,
Disabled: noHistory,
}
ts.fm = NewFilterMaps(ts.db, view, ts.params, config)
ts.fm.testDisableSnapshots = ts.testDisableSnapshots