mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
return [] instead of null for withdrawals (#7279)
This commit is contained in:
parent
9690228ede
commit
c60a6a2962
@ -341,6 +341,11 @@ func RPCMarshalBlockExDeprecated(block *types.Block, inclTx bool, fullTx bool, b
|
||||
fields["withdrawals"] = block.Withdrawals()
|
||||
}
|
||||
|
||||
// Ensure that withdrawals is not null at all times.
|
||||
if fields["withdrawals"] == nil {
|
||||
fields["withdrawals"] = []*types.Withdrawal{}
|
||||
}
|
||||
|
||||
return fields, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user