diff --git a/lib/services/block/index.js b/lib/services/block/index.js index 376e951b..e9f180cb 100644 --- a/lib/services/block/index.js +++ b/lib/services/block/index.js @@ -41,11 +41,16 @@ BlockService.prototype.getAPIMethods = function() { ['getRawBlock', this, this.getRawBlock, 1], ['getBlockOverview', this, this.getBlockOverview, 1], ['getBestBlockHash', this, this.getBestBlockHash, 0], - ['syncPercentage', this, this.syncPercentage, 0] + ['syncPercentage', this, this.syncPercentage, 0], + ['isSynced', this, this.isSynced, 0] ]; return methods; }; +BlockService.prototype.isSynced = function(callback) { + callback(null, !this._initialSync); +}; + BlockService.prototype.getBestBlockHash = function(callback) { var hash = this._header.getLastHeader().hash; callback(null, hash); diff --git a/lib/services/insight-api b/lib/services/insight-api new file mode 120000 index 00000000..86f819d4 --- /dev/null +++ b/lib/services/insight-api @@ -0,0 +1 @@ +/Users/chrisk/source/insight-api \ No newline at end of file