mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +00:00
beacon/engine: ensure nil ExecutionPayloadEnvelope.BlockValue doesn't crash (#35140)
Found while updating to go-ethereum master in prysm.
This commit is contained in:
parent
e444c267a2
commit
8a8becaeab
1 changed files with 5 additions and 1 deletions
|
|
@ -66,7 +66,11 @@ func (e ExecutionPayloadEnvelope) MarshalJSON() ([]byte, error) {
|
|||
b.RawValue(payload)
|
||||
|
||||
b.Key("blockValue")
|
||||
b.HexBigInt(e.BlockValue)
|
||||
if e.BlockValue != nil {
|
||||
b.HexBigInt(e.BlockValue)
|
||||
} else {
|
||||
b.Null()
|
||||
}
|
||||
|
||||
b.Key("blobsBundle")
|
||||
marshalBlobsBundle(&b, e.BlobsBundle)
|
||||
|
|
|
|||
Loading…
Reference in a new issue