diff options
author | Felix Lange <fjl@twurst.com> | 2016-04-15 16:57:37 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-04-15 16:57:37 +0800 |
commit | 24cdac41f34b37145c89572712db0854dd411110 (patch) | |
tree | 54c96106a142408bbe0408c7905fed25c22f1bff /core/database_util_test.go | |
parent | fdc5a7dc1a1764c63190a649f70296cbdbc0abe1 (diff) | |
download | go-tangerine-24cdac41f34b37145c89572712db0854dd411110.tar go-tangerine-24cdac41f34b37145c89572712db0854dd411110.tar.gz go-tangerine-24cdac41f34b37145c89572712db0854dd411110.tar.bz2 go-tangerine-24cdac41f34b37145c89572712db0854dd411110.tar.lz go-tangerine-24cdac41f34b37145c89572712db0854dd411110.tar.xz go-tangerine-24cdac41f34b37145c89572712db0854dd411110.tar.zst go-tangerine-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/database_util_test.go')
-rw-r--r-- | core/database_util_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
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 { |