mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-13 11:36: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
e1521be67a
commit
3f1a3e8ea8
1 changed files with 1 additions and 1 deletions
|
|
@ -970,7 +970,7 @@ func RPCMarshalHeader(head *types.Header) map[string]interface{} {
|
||||||
result["requestsHash"] = head.RequestsHash
|
result["requestsHash"] = head.RequestsHash
|
||||||
}
|
}
|
||||||
if head.SlotNumber != nil {
|
if head.SlotNumber != nil {
|
||||||
result["slotNumber"] = head.SlotNumber
|
result["slotNumber"] = hexutil.Uint64(*head.SlotNumber)
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue