Merge pull request #760 from kilpatty/node-http-reset-enforce

node-http: add check for height being below tip
This commit is contained in:
Braydon Fuller 2019-05-03 09:19:08 -07:00
commit c54abb79f1
No known key found for this signature in database
GPG Key ID: F24F232D108B3AD4

View File

@ -339,6 +339,8 @@ class HTTP extends Server {
const height = valid.u32('height');
enforce(height != null, 'Height is required.');
enforce(height <= this.chain.height,
'Height cannot be greater than chain tip.');
await this.chain.reset(height);