diff --git a/lib/bcoin/config.js b/lib/bcoin/config.js index 500570b2..1b70d451 100644 --- a/lib/bcoin/config.js +++ b/lib/bcoin/config.js @@ -136,6 +136,7 @@ config.parseData = function parseData(data) { options.coinCache = bool(data.coincache); options.indexTX = bool(data.indextx); options.indexAddress = bool(data.indexaddress); + options.noScan = bool(data.noscan); // Mempool options.limitFree = bool(data.limitfree); diff --git a/lib/bcoin/fullnode.js b/lib/bcoin/fullnode.js index 7abf74dd..66a3ee49 100644 --- a/lib/bcoin/fullnode.js +++ b/lib/bcoin/fullnode.js @@ -297,6 +297,10 @@ Fullnode.prototype._open = function open(callback) { }); }, function(next) { + if (self.options.noScan) { + self.walletdb.tx.writeTip(self.chain.tip.hash, next); + return next(); + } // Always rescan to make sure we didn't miss anything: // there is no atomicity between the chaindb and walletdb. self.walletdb.rescan(self.chain.db, next);