From 1816cdc9fdad7af6085369efb9864d934aae2c81 Mon Sep 17 00:00:00 2001 From: Delweng Date: Thu, 25 May 2023 21:19:58 +0800 Subject: [PATCH] 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: jsvisa --- internal/ethapi/api.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 69b5bf1304bbe..8b0c8a773862d 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1237,7 +1237,6 @@ func RPCMarshalHeader(head *types.Header) map[string]interface{} { "miner": head.Coinbase, "difficulty": (*hexutil.Big)(head.Difficulty), "extraData": hexutil.Bytes(head.Extra), - "size": hexutil.Uint64(head.Size()), "gasLimit": hexutil.Uint64(head.GasLimit), "gasUsed": hexutil.Uint64(head.GasUsed), "timestamp": hexutil.Uint64(head.Time),