Removed header interval.
This commit is contained in:
parent
007f69d908
commit
f90e0d2ed5
16
errors.txt
16
errors.txt
@ -1,16 +0,0 @@
|
|||||||
17-10-16T23:06:28.131Z] error: Error: Block hash or address expected
|
|
||||||
Oct 16 23:06:28 rs-iad-insight-04 bitcored[23072]: at TxController.list (/home/bitcore/.npm-packages/lib/node_modules/bitcore/node_modules/insight-api/lib/transactions.js:321:37)
|
|
||||||
Oct 16 23:06:28 rs-iad-insight-04 bitcored[23072]: at Layer.handle [as handle_request] (/home/bitcore/.npm-packages/lib/node_modules/bitcore/node_modules/express/lib/router/layer.js:95:5)
|
|
||||||
Oct 16 23:06:28 rs-iad-insight-04 bitcored[23072]: at next (/home/bitcore/.npm-packages/lib/node_modules/bitcore/node_modules/express/lib/router/route.js:137:13)
|
|
||||||
Oct 16 23:06:28 rs-iad-insight-04 bitcored[23072]: at /home/bitcore/.npm-packages/lib/node_modules/bitcore/node_modules/insight-api/lib/index.js:73:5
|
|
||||||
Oct 16 23:06:28 rs-iad-insight-04 bitcored[23072]: at Layer.handle [as handle_request] (/home/bitcore/.npm-packages/lib/node_modules/bitcore/node_modules/express/lib/router/layer.js:95:5)
|
|
||||||
Oct 16 23:06:28 rs-iad-insight-04 bitcored[23072]: at next (/home/bitcore/.npm-packages/lib/node_modules/bitcore/node_modules/express/lib/router/route.js:137:13)
|
|
||||||
Oct 16 23:06:28 rs-iad-insight-04 bitcored[23072]: at Route.dispatch (/home/bitcore/.npm-packages/lib/node_modules/bitcore/node_modules/express/lib/router/route.js:112:3)
|
|
||||||
Oct 16 23:06:28 rs-iad-insight-04 bitcored[23072]: at Layer.handle [as handle_request] (/home/bitcore/.npm-packages/lib/node_modules/bitcore/node_modules/express/lib/router/layer.js:95:5)
|
|
||||||
Oct 16 23:06:28 rs-iad-insight-04 bitcored[23072]: at /home/bitcore/.npm-packages/lib/node_modules/bitcore/node_modules/express/lib/router/index.js:281:22
|
|
||||||
Oct 16 23:06:28 rs-iad-insight-04 bitcored[23072]: at
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
17
|
|
||||||
|
|
||||||
@ -222,11 +222,6 @@ HeaderService.prototype.start = function(callback) {
|
|||||||
|
|
||||||
HeaderService.prototype.stop = function(callback) {
|
HeaderService.prototype.stop = function(callback) {
|
||||||
|
|
||||||
if (this._headerInterval) {
|
|
||||||
clearInterval(this._headerInterval);
|
|
||||||
this._headerInterval = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
callback();
|
callback();
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -441,11 +436,6 @@ HeaderService.prototype._onHeaders = function(headers) {
|
|||||||
// used to tell the header sync loop when to stop
|
// used to tell the header sync loop when to stop
|
||||||
self._lastHeaderCount = headers.length;
|
self._lastHeaderCount = headers.length;
|
||||||
|
|
||||||
if (self._headerInterval) {
|
|
||||||
clearInterval(self._headerInterval);
|
|
||||||
self._headerInterval = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
log.debug('Header Service: Received: ' + headers.length + ' header(s).');
|
log.debug('Header Service: Received: ' + headers.length + ' header(s).');
|
||||||
|
|
||||||
if (!headers[0]) {
|
if (!headers[0]) {
|
||||||
@ -854,15 +844,6 @@ HeaderService.prototype._logProgress = function() {
|
|||||||
HeaderService.prototype._getP2PHeaders = function(hash) {
|
HeaderService.prototype._getP2PHeaders = function(hash) {
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
if (!self._headerInterval) {
|
|
||||||
|
|
||||||
self._headerInterval = setInterval(function() {
|
|
||||||
log.info('Header Service: we have not received a response to getHeaders from the network, retrying.');
|
|
||||||
self._p2p.getHeaders({ startHash: hash });
|
|
||||||
}, 2000);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
self._p2p.getHeaders({ startHash: hash });
|
self._p2p.getHeaders({ startHash: hash });
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user