aboutsummaryrefslogtreecommitdiffstats
path: root/core/types
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-04-15 16:57:37 +0800
committerFelix Lange <fjl@twurst.com>2016-04-15 16:57:37 +0800
commit24cdac41f34b37145c89572712db0854dd411110 (patch)
tree54c96106a142408bbe0408c7905fed25c22f1bff /core/types
parentfdc5a7dc1a1764c63190a649f70296cbdbc0abe1 (diff)
downloaddexon-24cdac41f34b37145c89572712db0854dd411110.tar
dexon-24cdac41f34b37145c89572712db0854dd411110.tar.gz
dexon-24cdac41f34b37145c89572712db0854dd411110.tar.bz2
dexon-24cdac41f34b37145c89572712db0854dd411110.tar.lz
dexon-24cdac41f34b37145c89572712db0854dd411110.tar.xz
dexon-24cdac41f34b37145c89572712db0854dd411110.tar.zst
dexon-24cdac41f34b37145c89572712db0854dd411110.zip
core, core/types, eth: add and use Block.Body
This fixes a few uses of unkeyed Body literals which go vet was complaining about.
Diffstat (limited to 'core/types')
-rw-r--r--core/types/block.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/types/block.go b/core/types/block.go
index 5e6a9019d..387a063ae 100644
--- a/core/types/block.go
+++ b/core/types/block.go
@@ -330,6 +330,9 @@ func (b *Block) Extra() []byte { return common.CopyBytes(b.header.Ext
func (b *Block) Header() *Header { return CopyHeader(b.header) }
+// Body returns the non-header content of the block.
+func (b *Block) Body() *Body { return &Body{b.transactions, b.uncles} }
+
func (b *Block) HashNoNonce() common.Hash {
return b.header.HashNoNonce()
}