chain: minor.

This commit is contained in:
Christopher Jeffrey 2017-09-06 23:06:41 -07:00
parent f63c19cb19
commit fdca08b498
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -2640,18 +2640,17 @@ Chain.prototype.getLocks = async function getLocks(prev, tx, view, flags) {
Chain.prototype.verifyLocks = async function verifyLocks(prev, tx, view, flags) { Chain.prototype.verifyLocks = async function verifyLocks(prev, tx, view, flags) {
const [height, time] = await this.getLocks(prev, tx, view, flags); const [height, time] = await this.getLocks(prev, tx, view, flags);
// Also catches case where if (height !== -1) {
// height is `-1`. Fall through.
if (height >= prev.height + 1) if (height >= prev.height + 1)
return false; return false;
}
if (time === -1) if (time !== -1) {
return true;
const mtp = await this.getMedianTime(prev); const mtp = await this.getMedianTime(prev);
if (time >= mtp) if (time >= mtp)
return false; return false;
}
return true; return true;
}; };