mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 21:08:10 -05:00
Fix Withdrawals Marshalling (#13066)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -332,8 +332,9 @@ func (e *ExecutionPayloadCapella) MarshalJSON() ([]byte, error) {
|
||||
timeStamp := hexutil.Uint64(e.Timestamp)
|
||||
recipient := common.BytesToAddress(e.FeeRecipient)
|
||||
logsBloom := hexutil.Bytes(e.LogsBloom)
|
||||
if e.Withdrawals == nil {
|
||||
e.Withdrawals = make([]*Withdrawal, 0)
|
||||
withdrawals := e.Withdrawals
|
||||
if withdrawals == nil {
|
||||
withdrawals = make([]*Withdrawal, 0)
|
||||
}
|
||||
return json.Marshal(ExecutionPayloadCapellaJSON{
|
||||
ParentHash: &pHash,
|
||||
@@ -350,7 +351,7 @@ func (e *ExecutionPayloadCapella) MarshalJSON() ([]byte, error) {
|
||||
BaseFeePerGas: baseFeeHex,
|
||||
BlockHash: &bHash,
|
||||
Transactions: transactions,
|
||||
Withdrawals: e.Withdrawals,
|
||||
Withdrawals: withdrawals,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -763,8 +764,9 @@ func (e *ExecutionPayloadDeneb) MarshalJSON() ([]byte, error) {
|
||||
timeStamp := hexutil.Uint64(e.Timestamp)
|
||||
recipient := common.BytesToAddress(e.FeeRecipient)
|
||||
logsBloom := hexutil.Bytes(e.LogsBloom)
|
||||
if e.Withdrawals == nil {
|
||||
e.Withdrawals = make([]*Withdrawal, 0)
|
||||
withdrawals := e.Withdrawals
|
||||
if withdrawals == nil {
|
||||
withdrawals = make([]*Withdrawal, 0)
|
||||
}
|
||||
blobGasUsed := hexutil.Uint64(e.BlobGasUsed)
|
||||
excessBlobGas := hexutil.Uint64(e.ExcessBlobGas)
|
||||
@@ -784,7 +786,7 @@ func (e *ExecutionPayloadDeneb) MarshalJSON() ([]byte, error) {
|
||||
BaseFeePerGas: baseFeeHex,
|
||||
BlockHash: &bHash,
|
||||
Transactions: transactions,
|
||||
Withdrawals: e.Withdrawals,
|
||||
Withdrawals: withdrawals,
|
||||
BlobGasUsed: &blobGasUsed,
|
||||
ExcessBlobGas: &excessBlobGas,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user