diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-04 08:25:04 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-04 08:32:10 +0800 |
commit | 2feb23c1dacf1cc7ef664d92f28b63dd46502f21 (patch) | |
tree | 5532c0a82ae0d39104977f5bc022e024de3043be /core/block_processor_test.go | |
parent | acd85fe95f025384885ed09560e32b227d80b26f (diff) | |
download | dexon-2feb23c1dacf1cc7ef664d92f28b63dd46502f21.tar.gz dexon-2feb23c1dacf1cc7ef664d92f28b63dd46502f21.tar.zst dexon-2feb23c1dacf1cc7ef664d92f28b63dd46502f21.zip |
core, eth, miner, xeth: receipt storage fix
* Added GetReceiptsFromBlock, GetReceipt, PutReceipts
* Added ContractAddress to receipt. See #1042
Diffstat (limited to 'core/block_processor_test.go')
-rw-r--r-- | core/block_processor_test.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/core/block_processor_test.go b/core/block_processor_test.go index 99681dabf..8c38d531f 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -64,12 +64,9 @@ func TestPutReceipt(t *testing.T) { Index: 0, }}) - PutReceipts(db, hash, types.Receipts{receipt}) - receipts, err := getBlockReceipts(db, hash) - if err != nil { - t.Error("got err:", err) - } - if len(receipts) != 1 { - t.Error("expected to get 1 receipt, got", len(receipts)) + PutReceipts(db, types.Receipts{receipt}) + receipt = GetReceipt(db, common.Hash{}) + if receipt == nil { + t.Error("expected to get 1 receipt, got none.") } } |