Merge pull request #760 from kilpatty/node-http-reset-enforce
node-http: add check for height being below tip
This commit is contained in:
commit
c54abb79f1
@ -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);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user