ineternal/ethapi: wrap block size with hex.Uint64

This commit is contained in:
rjl493456442 2019-07-25 10:09:59 +08:00
parent 08e5cd94a9
commit a511fa6898

View file

@ -991,7 +991,7 @@ func RPCMarshalHeader(head *types.Header) map[string]interface{} {
// transaction hashes. // transaction hashes.
func RPCMarshalBlock(block *types.Block, inclTx bool, fullTx bool) (map[string]interface{}, error) { func RPCMarshalBlock(block *types.Block, inclTx bool, fullTx bool) (map[string]interface{}, error) {
fields := RPCMarshalHeader(block.Header()) fields := RPCMarshalHeader(block.Header())
fields["size"] = block.Size() fields["size"] = hexutil.Uint64(block.Size())
if inclTx { if inclTx {
formatTx := func(tx *types.Transaction) (interface{}, error) { formatTx := func(tx *types.Transaction) (interface{}, error) {