Skip to content

Commit

Permalink
Fix trie db children size/dirties size tracking (#791)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronbuchwald authored Jun 1, 2022
1 parent 2beeb12 commit d53c64a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trie/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ func (db *Database) removeFromDirties(hash common.Hash, rlp []byte) {
delete(db.dirties, hash)
db.dirtiesSize -= common.StorageSize(common.HashLength + int(node.size))
if node.children != nil {
db.dirtiesSize -= common.StorageSize(cachedNodeChildrenSize + len(node.children)*(common.HashLength+2))
db.childrenSize -= common.StorageSize(cachedNodeChildrenSize + len(node.children)*(common.HashLength+2))
}
// Move the flushed node into the clean cache to prevent insta-reloads
if db.cleans != nil {
Expand Down

0 comments on commit d53c64a

Please sign in to comment.