mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-18 00:50:39 +00:00
internal/ethapi: encode slotNumber as hex in RPCMarshalHeader (#34005)
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. Co-authored-by: qu0b <stefan@starflinger.eu>
This commit is contained in:
parent
189f9d0b17
commit
ede376af8e
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