Ivan Socolsky
9 years ago
No known key found for this signature in database
GPG Key ID: FAECE6A05FAA4F56
1 changed files with
14 additions and
0 deletions
-
lib/blockchainexplorers/insight.js
|
@ -162,6 +162,20 @@ Insight.prototype.estimateFee = function(nbBlocks, cb) { |
|
|
}); |
|
|
}); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
Insight.prototype.getBlockchainHeight = function(cb) { |
|
|
|
|
|
var path = this.apiPrefix + '/sync'; |
|
|
|
|
|
|
|
|
|
|
|
var args = { |
|
|
|
|
|
method: 'GET', |
|
|
|
|
|
path: path, |
|
|
|
|
|
json: true, |
|
|
|
|
|
}; |
|
|
|
|
|
this._doRequest(args, function(err, res, body) { |
|
|
|
|
|
if (err || res.statusCode !== 200) return cb(_parseErr(err, res)); |
|
|
|
|
|
return cb(null, body.blockChainHeight); |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
Insight.prototype.initSocket = function() { |
|
|
Insight.prototype.initSocket = function() { |
|
|
|
|
|
|
|
|
// sockets always use the first server on the pull
|
|
|
// sockets always use the first server on the pull
|
|
|