mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
core/types: add empty withdrawls to body if len == 0
This commit is contained in:
parent
5d8522118e
commit
bcea950238
1 changed files with 1 additions and 0 deletions
|
|
@ -260,6 +260,7 @@ func NewBlock(header *Header, body *Body, receipts []*Receipt, hasher TrieHasher
|
|||
b.header.WithdrawalsHash = nil
|
||||
} else if len(withdrawals) == 0 {
|
||||
b.header.WithdrawalsHash = &EmptyWithdrawalsHash
|
||||
b.withdrawals = Withdrawals{}
|
||||
} else {
|
||||
hash := DeriveSha(Withdrawals(withdrawals), hasher)
|
||||
b.header.WithdrawalsHash = &hash
|
||||
|
|
|
|||
Loading…
Reference in a new issue