http: fix chain resetting for client.

This commit is contained in:
Christopher Jeffrey 2017-03-17 07:13:19 -07:00
parent e821eb10bf
commit db715036aa
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 5 additions and 5 deletions

View File

@ -391,13 +391,13 @@ HTTPClient.prototype.rescan = function rescan(height) {
/**
* Reset the chain.
* @param {Hash|Number} block
* @param {Number} height
* @returns {Promise}
*/
HTTPClient.prototype.reset = function reset(block) {
var options = { block: block };
return this._post('/_admin/reset', options);
HTTPClient.prototype.reset = function reset(height) {
var options = { height: height };
return this._post('/reset', options);
};
/**

View File

@ -340,7 +340,7 @@ HTTPServer.prototype.initRouter = function initRouter() {
var valid = req.valid();
var height = valid.u32('height');
enforce(height != null, 'Hash or height is required.');
enforce(height != null, 'Height is required.');
yield this.chain.reset(height);