diff --git a/lib/services/bitcoind/index.js b/lib/services/bitcoind/index.js index e812e272..d5043c51 100644 --- a/lib/services/bitcoind/index.js +++ b/lib/services/bitcoind/index.js @@ -25,6 +25,9 @@ function Bitcoin(options) { this.subscriptions.rawtransaction = []; this.subscriptions.hashblock = []; + this.startRetryTimes = this.options.startRetryTimes || 120; + this.startRetryInterval = this.options.startRetryInterval || 1000; + this._initClients(); this._process = options.process || process; @@ -317,7 +320,7 @@ Bitcoin.prototype._connectProcess = function(config, callback) { var node = {}; var exitShutdown = false; - async.retry({times: 60, interval: self.startRetryInterval}, function(done) { + async.retry({times: self.startRetryTimes, interval: self.startRetryInterval}, function(done) { if (self.node.stopping) { exitShutdown = true; return done();