smart by default
This commit is contained in:
parent
72438e78ef
commit
a4dd13de15
|
@ -13,11 +13,11 @@ var async = require('async');
|
||||||
program
|
program
|
||||||
.version(SYNC_VERSION)
|
.version(SYNC_VERSION)
|
||||||
.option('-N --network [livenet]', 'Set bitcoin network [testnet]', 'testnet')
|
.option('-N --network [livenet]', 'Set bitcoin network [testnet]', 'testnet')
|
||||||
.option('-S --smart', 'genesis stored? uptoexisting = 1', 1)
|
|
||||||
.option('-D --destroy', 'Remove current DB (and start from there)', 0)
|
.option('-D --destroy', 'Remove current DB (and start from there)', 0)
|
||||||
.option('-R --reverse', 'Sync backwards', 0)
|
.option('-R --reverse', 'Sync backwards', 0)
|
||||||
.option('-U --uptoexisting', 'Sync only until an existing block is found', 0)
|
.option('-U --uptoexisting', 'Sync only until an existing block is found', 0)
|
||||||
.option('-F --fromfiles', 'Sync using bitcoind .dat block files (faster)', 0)
|
.option('-F --fromfiles', 'Sync using bitcoind .dat block files (faster)', 0)
|
||||||
|
.option('-S --smart', 'genesis stored? uptoexisting = 1, fromFiles=1 [default]', true)
|
||||||
.option('-v --verbose', 'Verbose 0/1', 0)
|
.option('-v --verbose', 'Verbose 0/1', 0)
|
||||||
.parse(process.argv);
|
.parse(process.argv);
|
||||||
|
|
||||||
|
@ -34,7 +34,9 @@ async.series([
|
||||||
},
|
},
|
||||||
function(cb) {
|
function(cb) {
|
||||||
|
|
||||||
if (program.smart) {
|
if (typeof program.smart === 'undefined' || parseInt(program.smart) ) {
|
||||||
|
|
||||||
|
console.log('[sync.js.38]'); //TODO
|
||||||
historicSync.smartImport({
|
historicSync.smartImport({
|
||||||
destroy: program.destroy,
|
destroy: program.destroy,
|
||||||
},cb);
|
},cb);
|
||||||
|
|
Loading…
Reference in New Issue