Unverified Commit 1816cdc9 authored by Delweng's avatar Delweng Committed by GitHub

internal/ethapi: don't return header size from rpc (#27347)

RPC methods `eth_getHeaderBy*` returned a size value which was meant for internal
processes. Please instead use `size` field returned by `eth_getBlockBy*` if you're interested
in the RLP encoded storage size of the block.
Signed-off-by: 's avatarjsvisa <delweng@gmail.com>
parent db9a178a
...@@ -1237,7 +1237,6 @@ func RPCMarshalHeader(head *types.Header) map[string]interface{} { ...@@ -1237,7 +1237,6 @@ func RPCMarshalHeader(head *types.Header) map[string]interface{} {
"miner": head.Coinbase, "miner": head.Coinbase,
"difficulty": (*hexutil.Big)(head.Difficulty), "difficulty": (*hexutil.Big)(head.Difficulty),
"extraData": hexutil.Bytes(head.Extra), "extraData": hexutil.Bytes(head.Extra),
"size": hexutil.Uint64(head.Size()),
"gasLimit": hexutil.Uint64(head.GasLimit), "gasLimit": hexutil.Uint64(head.GasLimit),
"gasUsed": hexutil.Uint64(head.GasUsed), "gasUsed": hexutil.Uint64(head.GasUsed),
"timestamp": hexutil.Uint64(head.Time), "timestamp": hexutil.Uint64(head.Time),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment