Added isSynced.
This commit is contained in:
parent
2fa6b5c314
commit
6c8d8e437b
@ -41,11 +41,16 @@ BlockService.prototype.getAPIMethods = function() {
|
|||||||
['getRawBlock', this, this.getRawBlock, 1],
|
['getRawBlock', this, this.getRawBlock, 1],
|
||||||
['getBlockOverview', this, this.getBlockOverview, 1],
|
['getBlockOverview', this, this.getBlockOverview, 1],
|
||||||
['getBestBlockHash', this, this.getBestBlockHash, 0],
|
['getBestBlockHash', this, this.getBestBlockHash, 0],
|
||||||
['syncPercentage', this, this.syncPercentage, 0]
|
['syncPercentage', this, this.syncPercentage, 0],
|
||||||
|
['isSynced', this, this.isSynced, 0]
|
||||||
];
|
];
|
||||||
return methods;
|
return methods;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
BlockService.prototype.isSynced = function(callback) {
|
||||||
|
callback(null, !this._initialSync);
|
||||||
|
};
|
||||||
|
|
||||||
BlockService.prototype.getBestBlockHash = function(callback) {
|
BlockService.prototype.getBestBlockHash = function(callback) {
|
||||||
var hash = this._header.getLastHeader().hash;
|
var hash = this._header.getLastHeader().hash;
|
||||||
callback(null, hash);
|
callback(null, hash);
|
||||||
|
|||||||
1
lib/services/insight-api
Symbolic link
1
lib/services/insight-api
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/Users/chrisk/source/insight-api
|
||||||
Loading…
Reference in New Issue
Block a user