Skip to content

Commit

Permalink
fix wierd block with MPT state
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign committed Feb 28, 2024
1 parent 876a028 commit 04e7aa0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1738,8 +1738,9 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
}
}
rootz := parent.Root
if count > 0 {
rootz = state.LastCommittedRoot
if count == 1 {
// Force first block to fallback to the tree.
rootz = common.HexToHash("0x00")
}
count++
statedb, err := state.New(rootz, bc.stateCache, bc.snaps)
Expand Down

0 comments on commit 04e7aa0

Please sign in to comment.