remove unnecessary snapshot Cap in flush

This commit is contained in:
Guillaume Ballet 2023-08-11 07:42:58 +02:00
parent 29c8f98329
commit bea2b7ea8c
2 changed files with 1 additions and 11 deletions

View file

@ -184,7 +184,7 @@ func (ga *GenesisAlloc) flush(db ethdb.Database, triedb *trie.Database, blockhas
} }
rawdb.WriteGenesisStateSpec(db, blockhash, blob) rawdb.WriteGenesisStateSpec(db, blockhash, blob)
return statedb.Cap(root) // XXX check this is still necessary return nil
} }
// CommitGenesisState loads the stored genesis state with the given block // CommitGenesisState loads the stored genesis state with the given block

View file

@ -1215,16 +1215,6 @@ func (s *StateDB) GetTrie() Trie {
return s.trie return s.trie
} }
// XXX check it's still needed
func (s *StateDB) Cap(root common.Hash) error {
if s.snaps != nil {
return s.snaps.Cap(root, 0)
}
// pre-verkle path: noop if s.snaps hasn't been
// initialized.
return nil
}
// Commit writes the state to the underlying in-memory trie database. // Commit writes the state to the underlying in-memory trie database.
// Once the state is committed, tries cached in stateDB (including account // Once the state is committed, tries cached in stateDB (including account
// trie, storage tries) will no longer be functional. A new state instance // trie, storage tries) will no longer be functional. A new state instance