mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 13:21:37 +00:00
ethapi: encode slotNumber as hex in RPCMarshalHeader
The slotNumber field was being passed as a raw *uint64 to the JSON marshaler, which serializes it as a plain decimal integer (e.g. 159). All Ethereum JSON-RPC quantity fields must be hex-encoded per spec. Wrap with hexutil.Uint64 to match the encoding of other numeric header fields like blobGasUsed and excessBlobGas.
This commit is contained in:
parent
189f9d0b17
commit
392507df50
1 changed files with 1 additions and 1 deletions
|
|
@ -966,7 +966,7 @@ func RPCMarshalHeader(head *types.Header) map[string]interface{} {
|
|||
result["requestsHash"] = head.RequestsHash
|
||||
}
|
||||
if head.SlotNumber != nil {
|
||||
result["slotNumber"] = head.SlotNumber
|
||||
result["slotNumber"] = hexutil.Uint64(*head.SlotNumber)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue