diff options
author | Todd Stock <[email protected]> | 2020-11-19 07:27:22 -0500 |
---|---|---|
committer | Todd Stock <[email protected]> | 2020-11-19 07:27:22 -0500 |
commit | 5337f45e5469c3240d6917d0ec47a7d9b93ae9ea (patch) | |
tree | 282335ac77333487251ad8226ea18160e1b3d455 /internal/ethapi | |
parent | ae4541f42a666fb5ae1c36d6f7423c3d9eb2c875 (diff) |
add block extra data
Diffstat (limited to 'internal/ethapi')
-rw-r--r-- | internal/ethapi/api.go | 4 |
1 files changed, 4 insertions, 0 deletions
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 |