mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
fix withdrawal nil pointer dereference
This commit is contained in:
parent
ea7217b5dd
commit
6d443ca1d2
1 changed files with 7 additions and 2 deletions
|
|
@ -319,8 +319,13 @@ func (sim *simulator) processBlock(ctx context.Context, block *simBlock, header,
|
|||
reqHash := types.CalcRequestsHash(requests)
|
||||
header.RequestsHash = &reqHash
|
||||
}
|
||||
|
||||
blockBody := &types.Body{Transactions: txes, Withdrawals: *block.BlockOverrides.Withdrawals}
|
||||
var withdrawals []*types.Withdrawal
|
||||
if block.BlockOverrides.Withdrawals != nil {
|
||||
withdrawals = *block.BlockOverrides.Withdrawals
|
||||
} else {
|
||||
withdrawals = []*types.Withdrawal{}
|
||||
}
|
||||
blockBody := &types.Body{Transactions: txes, Withdrawals: withdrawals}
|
||||
chainHeadReader := &simChainHeadReader{ctx, sim.b}
|
||||
b, err := sim.b.Engine().FinalizeAndAssemble(chainHeadReader, header, sim.state, blockBody, receipts)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue