Skip to content

Commit

Permalink
wdb-migration: remove unnecessary indexes from TXCountTimeIndex.
Browse files Browse the repository at this point in the history
  • Loading branch information
nodech committed Sep 23, 2024
1 parent 9165139 commit ce04d65
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/wallet/migrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,6 @@ class MigrateTXCountTimeIndex extends AbstractMigration {
this.layout = MigrateTXCountTimeIndex.layout();

this.headersBatchSize = 1000;
this.confirmedBatchSize = 1000;
this.unconfirmedBatchSize = 1000;

this.UNCONFIRMED_HEIGHT = 0xffffffff;

Expand Down Expand Up @@ -1227,9 +1225,6 @@ class MigrateTXCountTimeIndex extends AbstractMigration {
// Latest unconfirmed Index.
I: bdb.key('I'),

// Coin - we need this in order to find accounts.
// c[tx-hash][index] -> coin
c: bdb.key('c', ['hash256', 'uint32']),
// We need this for spent inputs in blocks.
// d[tx-hash][index] -> undo coin
d: bdb.key('d', ['hash256', 'uint32']),
Expand All @@ -1242,8 +1237,8 @@ class MigrateTXCountTimeIndex extends AbstractMigration {

// these are not affected by the migration, but here for reference
// and time check.
// t[tx-hash] -> extended tx
t: bdb.key('t', ['hash256']),
T: bdb.key('T', ['uint32', 'hash256']),

// Transaction.
// z[height][index] -> tx hash (tx by count)
Expand All @@ -1258,8 +1253,6 @@ class MigrateTXCountTimeIndex extends AbstractMigration {
// Confirmed.
// b[height] -> block record
b: bdb.key('b', ['uint32']),
// h[height][tx-hash] -> dummy (tx by height)
h: bdb.key('h', ['uint32', 'hash256']),

// g[time][height][index][hash] -> dummy (tx by time)
g: bdb.key('g', ['uint32', 'uint32', 'uint32', 'hash256']),
Expand Down

0 comments on commit ce04d65

Please sign in to comment.