fullnode: add noScan option.
This commit is contained in:
parent
870f6e65b4
commit
c582a0fad8
@ -136,6 +136,7 @@ config.parseData = function parseData(data) {
|
|||||||
options.coinCache = bool(data.coincache);
|
options.coinCache = bool(data.coincache);
|
||||||
options.indexTX = bool(data.indextx);
|
options.indexTX = bool(data.indextx);
|
||||||
options.indexAddress = bool(data.indexaddress);
|
options.indexAddress = bool(data.indexaddress);
|
||||||
|
options.noScan = bool(data.noscan);
|
||||||
|
|
||||||
// Mempool
|
// Mempool
|
||||||
options.limitFree = bool(data.limitfree);
|
options.limitFree = bool(data.limitfree);
|
||||||
|
|||||||
@ -297,6 +297,10 @@ Fullnode.prototype._open = function open(callback) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
function(next) {
|
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:
|
// Always rescan to make sure we didn't miss anything:
|
||||||
// there is no atomicity between the chaindb and walletdb.
|
// there is no atomicity between the chaindb and walletdb.
|
||||||
self.walletdb.rescan(self.chain.db, next);
|
self.walletdb.rescan(self.chain.db, next);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user