aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockchain_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-10-22 20:43:21 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-11-19 22:03:32 +0800
commite86e0ecdc8a977db2ff5df60dca3cad8355ace6d (patch)
tree5944b33220457ad5da31b33e15774882c2e6201f /core/blockchain_test.go
parentae37a8013d5a348bdb21d4a66d5f462e0baf7cd8 (diff)
downloadgo-tangerine-e86e0ecdc8a977db2ff5df60dca3cad8355ace6d.tar
go-tangerine-e86e0ecdc8a977db2ff5df60dca3cad8355ace6d.tar.gz
go-tangerine-e86e0ecdc8a977db2ff5df60dca3cad8355ace6d.tar.bz2
go-tangerine-e86e0ecdc8a977db2ff5df60dca3cad8355ace6d.tar.lz
go-tangerine-e86e0ecdc8a977db2ff5df60dca3cad8355ace6d.tar.xz
go-tangerine-e86e0ecdc8a977db2ff5df60dca3cad8355ace6d.tar.zst
go-tangerine-e86e0ecdc8a977db2ff5df60dca3cad8355ace6d.zip
core, eth, miner, xeth: clean up tx/receipt db accessors
Diffstat (limited to 'core/blockchain_test.go')
-rw-r--r--core/blockchain_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/blockchain_test.go b/core/blockchain_test.go
index e5ed66377..f18b5d084 100644
--- a/core/blockchain_test.go
+++ b/core/blockchain_test.go
@@ -937,8 +937,8 @@ func TestChainTxReorgs(t *testing.T) {
// removed tx
for i, tx := range (types.Transactions{pastDrop, freshDrop}) {
- if GetTransaction(db, tx.Hash()) != nil {
- t.Errorf("drop %d: tx found while shouldn't have been", i)
+ if txn, _, _, _ := GetTransaction(db, tx.Hash()); txn != nil {
+ t.Errorf("drop %d: tx %v found while shouldn't have been", i, txn)
}
if GetReceipt(db, tx.Hash()) != nil {
t.Errorf("drop %d: receipt found while shouldn't have been", i)
@@ -946,7 +946,7 @@ func TestChainTxReorgs(t *testing.T) {
}
// added tx
for i, tx := range (types.Transactions{pastAdd, freshAdd, futureAdd}) {
- if GetTransaction(db, tx.Hash()) == nil {
+ if txn, _, _, _ := GetTransaction(db, tx.Hash()); txn == nil {
t.Errorf("add %d: expected tx to be found", i)
}
if GetReceipt(db, tx.Hash()) == nil {
@@ -955,7 +955,7 @@ func TestChainTxReorgs(t *testing.T) {
}
// shared tx
for i, tx := range (types.Transactions{postponed, swapped}) {
- if GetTransaction(db, tx.Hash()) == nil {
+ if txn, _, _, _ := GetTransaction(db, tx.Hash()); txn == nil {
t.Errorf("share %d: expected tx to be found", i)
}
if GetReceipt(db, tx.Hash()) == nil {