Added isSynced.

This commit is contained in:
Chris Kleeschulte 2017-08-18 12:54:13 -04:00
parent 2fa6b5c314
commit 6c8d8e437b
2 changed files with 7 additions and 1 deletions

View File

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

1
lib/services/insight-api Symbolic link
View File

@ -0,0 +1 @@
/Users/chrisk/source/insight-api