aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockchain_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-07-15 00:39:53 +0800
committerGitHub <noreply@github.com>2017-07-15 00:39:53 +0800
commit0ff35e170d1b913082313089d13e3e6d5490839b (patch)
tree42b8eafa61c6e5894768c41a97d51e4e5427b50f /core/blockchain_test.go
parent8d6a5a3581ce6221786eb464bfef7e8c31e7ad95 (diff)
downloadgo-tangerine-0ff35e170d1b913082313089d13e3e6d5490839b.tar.gz
go-tangerine-0ff35e170d1b913082313089d13e3e6d5490839b.tar.zst
go-tangerine-0ff35e170d1b913082313089d13e3e6d5490839b.zip
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
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 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)
}
}