Skip to content

Commit

Permalink
core/state/snapshot: linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed May 2, 2022
1 parent ae3c975 commit eab6d61
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/state/snapshot/journal.go
Expand Up @@ -358,15 +358,14 @@ func iterateJournal(db ethdb.KeyValueReader, callback journalCallback) error {
}
parent = root
}
return nil
}

// CheckJournalStorage performs consistency-checks on the journalled
// difflayers.
func CheckJournalStorage(db ethdb.KeyValueStore) error {
// Load all the snapshot diffs from the journal
return iterateJournal(db, func(pRoot, root common.Hash, destructs map[common.Hash]struct{}, accounts map[common.Hash][]byte, storage map[common.Hash]map[common.Hash][]byte) error {
for accHash, _ := range storage {
for accHash := range storage {
if _, ok := accounts[accHash]; !ok {
log.Error("Dangling storage - missing account", "account", fmt.Sprintf("%#x", accHash), "root", root)
}
Expand Down

0 comments on commit eab6d61

Please sign in to comment.