From 5337f45e5469c3240d6917d0ec47a7d9b93ae9ea Mon Sep 17 00:00:00 2001 From: Todd Stock Date: Thu, 19 Nov 2020 07:27:22 -0500 Subject: add block extra data --- internal/ethapi/api.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index d894ea0..77efcab 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1161,6 +1161,10 @@ func RPCMarshalBlock(block *types.Block, inclTx bool, fullTx bool) (map[string]i fields := RPCMarshalHeader(block.Header()) fields["size"] = hexutil.Uint64(block.Size()) + if len(block.ExtraData()) != 0 { + fields["blockExtraData"] = hexutil.Encode(block.ExtraData()) + } + if inclTx { formatTx := func(tx *types.Transaction) (interface{}, error) { return tx.Hash(), nil -- cgit v1.2.3-70-g09d2