mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
remove unnecessary snapshot Cap in flush
This commit is contained in:
parent
29c8f98329
commit
bea2b7ea8c
2 changed files with 1 additions and 11 deletions
|
|
@ -184,7 +184,7 @@ func (ga *GenesisAlloc) flush(db ethdb.Database, triedb *trie.Database, blockhas
|
|||
}
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1215,16 +1215,6 @@ func (s *StateDB) GetTrie() 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.
|
||||
// Once the state is committed, tries cached in stateDB (including account
|
||||
// trie, storage tries) will no longer be functional. A new state instance
|
||||
|
|
|
|||
Loading…
Reference in a new issue