Skip to content

Commit 04e7aa0

Browse files
committed
fix wierd block with MPT state
Signed-off-by: Ignacio Hagopian <[email protected]>
1 parent 876a028 commit 04e7aa0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/blockchain.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,8 +1738,9 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
17381738
}
17391739
}
17401740
rootz := parent.Root
1741-
if count > 0 {
1742-
rootz = state.LastCommittedRoot
1741+
if count == 1 {
1742+
// Force first block to fallback to the tree.
1743+
rootz = common.HexToHash("0x00")
17431744
}
17441745
count++
17451746
statedb, err := state.New(rootz, bc.stateCache, bc.snaps)

0 commit comments

Comments
 (0)