mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
review feedback
This commit is contained in:
parent
7729aaaf35
commit
523dcbe20c
1 changed files with 1 additions and 9 deletions
|
|
@ -186,7 +186,7 @@ func New(root common.Hash, db Database, snaps *snapshot.Tree) (*StateDB, error)
|
||||||
hasher: crypto.NewKeccakState(),
|
hasher: crypto.NewKeccakState(),
|
||||||
}
|
}
|
||||||
if db.TrieDB().IsVerkle() {
|
if db.TrieDB().IsVerkle() {
|
||||||
sdb.accessEvents = sdb.NewAccessEvents()
|
sdb.accessEvents = NewAccessEvents(db.(*cachingDB).pointCache)
|
||||||
}
|
}
|
||||||
if sdb.snaps != nil {
|
if sdb.snaps != nil {
|
||||||
sdb.snap = sdb.snaps.Snapshot(root)
|
sdb.snap = sdb.snaps.Snapshot(root)
|
||||||
|
|
@ -1460,14 +1460,6 @@ func (s *StateDB) Witness() *stateless.Witness {
|
||||||
return s.witness
|
return s.witness
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StateDB) NewAccessEvents() *AccessEvents {
|
|
||||||
return &AccessEvents{
|
|
||||||
branches: make(map[branchAccessKey]mode),
|
|
||||||
chunks: make(map[chunkAccessKey]mode),
|
|
||||||
pointCache: utils.NewPointCache(100),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *StateDB) AccessEvents() *AccessEvents {
|
func (s *StateDB) AccessEvents() *AccessEvents {
|
||||||
return s.accessEvents
|
return s.accessEvents
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue