Speed up syncing by delaying saving metadata every 30 seconds.

This commit is contained in:
Braydon Fuller 2015-08-06 17:53:10 -04:00
parent fdba8e86e4
commit 50981b713a

View File

@ -221,6 +221,7 @@ Node.prototype._syncBitcoind = function() {
}
self.bitcoindSyncing = true;
self.chain.lastSavedMetadataThreshold = 30000;
log.info('Starting Bitcoind Sync');
@ -272,6 +273,7 @@ Node.prototype._syncBitcoind = function() {
}, function(err) {
log.info('Stopping Bitcoind Sync');
self.bitcoindSyncing = false;
self.chain.lastSavedMetadataThreshold = 0;
if (err) {
Error.captureStackTrace(err);
return self.emit('error', err);