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 6d0c54f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 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
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) {

This comment has been minimized.

Copy link
@ukane-philemon

ukane-philemon Dec 15, 2022

Author Collaborator

I was checking against v3. ErrTxnTooBig causing unnecessary error/failed tests.

This comment has been minimized.

Copy link
@ukane-philemon

ukane-philemon Dec 15, 2022

Author Collaborator

I was checking against v3.ErrTxnTooBig causing unnecessary errors/failed tests.

if errors.Is(err, bv1.ErrTxnTooBig) {
if err = txn.Commit(); err != nil {
txn.Discard()
return err
Expand Down

0 comments on commit 6d0c54f

Please sign in to comment.