Skip to content

Commit

Permalink
remove unavailable test file
Browse files Browse the repository at this point in the history
  • Loading branch information
ukane-philemon committed Dec 15, 2022
1 parent 14cd5b4 commit 36cd18c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions stakedb/ticketpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ var (
dbFolderRefV2 = "pooldiffs2.bdgr"
dbFolderFullV0 = "test_ticket_pool.bdgr"
dbFolderFullV1 = "test_ticket_pool_v1.bdgr"
dbFolderFullV2 = "test_ticket_pool_v2.bdgr"
fullHeight int64 = 239191
fullPoolSize = 40763
poolSpots = []int64{32215, 43268, 85508, 66322, 178346, 11013, 98265, 1081,
Expand Down Expand Up @@ -132,11 +131,7 @@ func TestTicketPoolTraverseFullV0(t *testing.T) {
}

func TestTicketPoolTraverseFullV1(t *testing.T) {
testTicketPoolTraverseFull(t, dbFolderFullV1)
}

func TestTicketPoolTraverseFullV2(t *testing.T) {
testTicketPoolTraverseFull(t, dbFolderFullV2)
testTicketPoolTraverseFull(t, dbFolderFullV1) // upgrades dbFolderFullV1
}

func testTicketPoolTraverseFull(t *testing.T, dir string) {
Expand Down Expand Up @@ -489,11 +484,11 @@ func TestTicketPoolPersistent(t *testing.T) {
t.Logf("Testing upgrade of v0 DB at %v", dbFolderRefV0)
testDBDir(dbFolderRefV0)

// Now test v1 db upgrade DB folder.
// Now the upgrade of the v1 folder in the temp copy.
t.Logf("Testing newly upgraded v1 DB at %v", dbFolderRefV1)
testDBDir(dbFolderRefV1)

// Now the reference v2 folder (should not modify it).
// Now the reference v2 folder the upgrade of the, should not modify it.
t.Logf("Testing reference v2 DB at %v", dbFolderRefV2)
testDBDir(dbFolderRefV2)
}
2 changes: 1 addition & 1 deletion stakedb/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func rewriteDB(db *bv1.DB, diffs []PoolDiff, heights []uint64, ver uint32) error
for i, h := range heights {
err := storeDiffTx(txn, &diffs[i], h)
// If this transaction got too big, commit and make a new one.
if errors.Is(err, badger.ErrTxnTooBig) {
if errors.Is(err, bv1.ErrTxnTooBig) {
if err = txn.Commit(); err != nil {
txn.Discard()
return err
Expand Down

0 comments on commit 36cd18c

Please sign in to comment.