Added start retry times as an option for bitcoin startup.

This commit is contained in:
Chris Kleeschulte 2017-04-21 14:40:11 -04:00
parent cef4088908
commit df38a6b838

View File

@ -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();