From 4e1709e9b6c572a6f718bc354fc7b079e09ef6c4 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 7 Nov 2016 22:11:32 -0800 Subject: [PATCH] walletdb: lookahead of 10. --- lib/wallet/account.js | 2 +- lib/wallet/wallet.js | 5 ----- migrate/walletdb5to6.js | 7 +++---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/wallet/account.js b/lib/wallet/account.js index d6d91790..865673b4 100644 --- a/lib/wallet/account.js +++ b/lib/wallet/account.js @@ -67,7 +67,7 @@ function Account(db, options) { this.receiveDepth = 0; this.changeDepth = 0; this.nestedDepth = 0; - this.lookahead = 20; + this.lookahead = 10; this.accountKey = null; this.keys = []; diff --git a/lib/wallet/wallet.js b/lib/wallet/wallet.js index bae75cb2..2b3a857b 100644 --- a/lib/wallet/wallet.js +++ b/lib/wallet/wallet.js @@ -1863,11 +1863,6 @@ Wallet.prototype.syncOutputDepth = co(function* syncOutputDepth(details) { if (!details) return derived; - if (this.db.options.safeSync) { - if (details.height === -1) - return; - } - for (i = 0; i < details.outputs.length; i++) { path = details.outputs[i].path; diff --git a/migrate/walletdb5to6.js b/migrate/walletdb5to6.js index 5737cc05..cfb36dac 100644 --- a/migrate/walletdb5to6.js +++ b/migrate/walletdb5to6.js @@ -275,12 +275,11 @@ co.spawn(function* () { yield patchPathMaps(); yield batch.write(); yield db.close(); - yield updateLookahead(); - yield unstate(); + // yield updateLookahead(); + // yield unstate(); }).then(function() { console.log('Migration complete.'); console.log('Rescan is required...'); - console.log('Start bcoin with `--start-height=[wallet-creation-height]`'); - console.log('for a fast sync.'); + console.log('Start bcoin with `--start-height=[wallet-creation-height]`.'); process.exit(0); });