From ce04d6588d299e5f386a8dc058724a3e52810881 Mon Sep 17 00:00:00 2001 From: Nodari Chkuaselidze Date: Mon, 23 Sep 2024 15:54:04 +0400 Subject: [PATCH] wdb-migration: remove unnecessary indexes from TXCountTimeIndex. --- lib/wallet/migrations.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/wallet/migrations.js b/lib/wallet/migrations.js index ea7dd6ca9..e22480f9f 100644 --- a/lib/wallet/migrations.js +++ b/lib/wallet/migrations.js @@ -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; @@ -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']), @@ -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) @@ -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']),