From 24cdac41f34b37145c89572712db0854dd411110 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 15 Apr 2016 10:57:37 +0200 Subject: core, core/types, eth: add and use Block.Body This fixes a few uses of unkeyed Body literals which go vet was complaining about. --- core/database_util_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/database_util_test.go') diff --git a/core/database_util_test.go b/core/database_util_test.go index ce1ffea8a..9ef787624 100644 --- a/core/database_util_test.go +++ b/core/database_util_test.go @@ -196,7 +196,7 @@ func TestBlockStorage(t *testing.T) { if entry := GetBody(db, block.Hash()); entry == nil { t.Fatalf("Stored body not found") } else if types.DeriveSha(types.Transactions(entry.Transactions)) != types.DeriveSha(block.Transactions()) || types.CalcUncleHash(entry.Uncles) != types.CalcUncleHash(block.Uncles()) { - t.Fatalf("Retrieved body mismatch: have %v, want %v", entry, &types.Body{block.Transactions(), block.Uncles()}) + t.Fatalf("Retrieved body mismatch: have %v, want %v", entry, block.Body()) } // Delete the block and verify the execution DeleteBlock(db, block.Hash()) @@ -230,7 +230,7 @@ func TestPartialBlockStorage(t *testing.T) { DeleteHeader(db, block.Hash()) // Store a body and check that it's not recognized as a block - if err := WriteBody(db, block.Hash(), &types.Body{block.Transactions(), block.Uncles()}); err != nil { + if err := WriteBody(db, block.Hash(), block.Body()); err != nil { t.Fatalf("Failed to write body into database: %v", err) } if entry := GetBlock(db, block.Hash()); entry != nil { @@ -242,7 +242,7 @@ func TestPartialBlockStorage(t *testing.T) { if err := WriteHeader(db, block.Header()); err != nil { t.Fatalf("Failed to write header into database: %v", err) } - if err := WriteBody(db, block.Hash(), &types.Body{block.Transactions(), block.Uncles()}); err != nil { + if err := WriteBody(db, block.Hash(), block.Body()); err != nil { t.Fatalf("Failed to write body into database: %v", err) } if entry := GetBlock(db, block.Hash()); entry == nil { -- cgit v1.2.3