From dcf31d28c1e6ac5071fd543890c577653563f0f2 Mon Sep 17 00:00:00 2001 From: ultragtx Date: Fri, 1 Dec 2017 17:18:30 +0800 Subject: [PATCH 1/2] Fix bad function position in mempool/index.js --- lib/services/mempool/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/services/mempool/index.js b/lib/services/mempool/index.js index a99601854..ad2f0d16f 100644 --- a/lib/services/mempool/index.js +++ b/lib/services/mempool/index.js @@ -30,6 +30,12 @@ util.inherits(MempoolService, BaseService); MempoolService.dependencies = ['db']; MempoolService.prototype.getAPIMethods = function() { + var methods = [ + ['getMempoolTransaction', this, this.getMempoolTransaction, 1], + ['getTxidsByAddress', this, this.getTxsByAddress, 2], + ]; + return methods; +}; MempoolService.prototype.subscribe = function(name, emitter) { this._subscriptions[name].push(emitter); @@ -43,12 +49,6 @@ MempoolService.prototype.unsubscribe = function(name, emitter) { } log.info(emitter.remoteAddress, 'unsubscribe:', 'mempool/' + name, 'total:', this._subscriptions[name].length); }; - var methods = [ - ['getMempoolTransaction', this, this.getMempoolTransaction, 1], - ['getTxidsByAddress', this, this.getTxsByAddress, 2], - ]; - return methods; -}; MempoolService.prototype.getPublishEvents = function() { return [ From 9910eb51e9291a166f10e1c42fe77f7afad93007 Mon Sep 17 00:00:00 2001 From: ultragtx Date: Sat, 2 Dec 2017 15:08:52 +0800 Subject: [PATCH 2/2] Fix variable name, _reportingInterval should be _reportInterval --- lib/services/block/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/block/index.js b/lib/services/block/index.js index 58cbd8328..83002e6c6 100644 --- a/lib/services/block/index.js +++ b/lib/services/block/index.js @@ -1077,7 +1077,7 @@ BlockService.prototype._startSync = function() { this.on('next block', this._sync.bind(this)); this.on('synced', this._onSynced.bind(this)); clearInterval(this._reportInterval); - this._reportingInterval = setInterval(this._logProgress.bind(this), 5000); + this._reportInterval = setInterval(this._logProgress.bind(this), 5000); return this._sync(); }