Skip to content

Commit

Permalink
fix set SafePointBlockNumber by mpt height replace current block number
Browse files Browse the repository at this point in the history
  • Loading branch information
joeylichang committed Jun 29, 2022
1 parent fc67458 commit ab834c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ func (bc *BlockChain) writeBlockWithState(block *types.Block, receipts []*types.
}
// Flush an entire trie and restart the counters
triedb.Commit(header.Root, true, nil)
rawdb.WriteSafePointBlockNumber(bc.db, current)
rawdb.WriteSafePointBlockNumber(bc.db, chosen)
lastWrite = chosen
bc.gcproc = 0
}
Expand Down

0 comments on commit ab834c4

Please sign in to comment.