core, core/types, eth: add and use Block.Body

This fixes a few uses of unkeyed Body literals which go vet was
complaining about.
This commit is contained in:
Felix Lange
2016-04-15 10:57:37 +02:00
parent fdc5a7dc1a
commit 24cdac41f3
5 changed files with 10 additions and 7 deletions

View File

@ -678,7 +678,7 @@ func (self *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain
}
}
// Write all the data out into the database
if err := WriteBody(self.chainDb, block.Hash(), &types.Body{block.Transactions(), block.Uncles()}); err != nil {
if err := WriteBody(self.chainDb, block.Hash(), block.Body()); err != nil {
errs[index] = fmt.Errorf("failed to write block body: %v", err)
atomic.AddInt32(&failed, 1)
glog.Fatal(errs[index])