Skip to content

Commit

Permalink
fix: lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
joeylichang committed Oct 16, 2023
1 parent 81b4a1b commit f456988
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1180,8 +1180,7 @@ func (bc *BlockChain) Stop() {
// - HEAD-127: So we have a hard limit on the number of blocks reexecuted
if !bc.cacheConfig.TrieDirtyDisabled {
triedb := bc.triedb
var once sync.Once

var once sync.Once
for _, offset := range []uint64{0, 1, TriesInMemory - 1} {
if number := bc.CurrentBlock().Number.Uint64(); number > offset {
recent := bc.GetBlockByNumber(number - offset)
Expand All @@ -1191,9 +1190,9 @@ func (bc *BlockChain) Stop() {
} else {
rawdb.WriteSafePointBlockNumber(bc.db, recent.NumberU64())
once.Do(func() {
rawdb.WriteHeadBlockHash(bc.db, recent.Hash())
rawdb.WriteHeadBlockHash(bc.db, recent.Hash())
})
}
}
}
}
if snapBase != (common.Hash{}) {
Expand Down
2 changes: 1 addition & 1 deletion core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ func (s *StateDB) slowDeleteStorage(addr common.Address, addrHash common.Hash, r
}
// skip deleting storages for EmptyTrie
if _, ok := tr.(*trie.EmptyTrie); ok {
return false, nil, nil, nil
return false, 0, nil, nil, nil
}
it, err := tr.NodeIterator(nil)
if err != nil {
Expand Down

0 comments on commit f456988

Please sign in to comment.