From 0ff35e170d1b913082313089d13e3e6d5490839b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 14 Jul 2017 19:39:53 +0300 Subject: core: remove redundant storage of transactions and receipts (#14801) * core: remove redundant storage of transactions and receipts * core, eth, internal: new transaction schema usage polishes * eth: implement upgrade mechanism for db deduplication * core, eth: drop old sequential key db upgrader * eth: close last iterator on successful db upgrage * core: prefix the lookup entries to make their purpose clearer --- core/blockchain_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/blockchain_test.go') diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 371522ab7..5fa671e2b 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -806,8 +806,8 @@ func TestChainTxReorgs(t *testing.T) { 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) + if rcpt, _, _, _ := GetReceipt(db, tx.Hash()); rcpt != nil { + t.Errorf("drop %d: receipt %v found while shouldn't have been", i, rcpt) } } // added tx @@ -815,7 +815,7 @@ func TestChainTxReorgs(t *testing.T) { if txn, _, _, _ := GetTransaction(db, tx.Hash()); txn == nil { t.Errorf("add %d: expected tx to be found", i) } - if GetReceipt(db, tx.Hash()) == nil { + if rcpt, _, _, _ := GetReceipt(db, tx.Hash()); rcpt == nil { t.Errorf("add %d: expected receipt to be found", i) } } @@ -824,7 +824,7 @@ func TestChainTxReorgs(t *testing.T) { if txn, _, _, _ := GetTransaction(db, tx.Hash()); txn == nil { t.Errorf("share %d: expected tx to be found", i) } - if GetReceipt(db, tx.Hash()) == nil { + if rcpt, _, _, _ := GetReceipt(db, tx.Hash()); rcpt == nil { t.Errorf("share %d: expected receipt to be found", i) } } -- cgit v1.2.3