chain: minor.
This commit is contained in:
parent
f63c19cb19
commit
fdca08b498
@ -2640,18 +2640,17 @@ Chain.prototype.getLocks = async function getLocks(prev, tx, view, flags) {
|
||||
Chain.prototype.verifyLocks = async function verifyLocks(prev, tx, view, flags) {
|
||||
const [height, time] = await this.getLocks(prev, tx, view, flags);
|
||||
|
||||
// Also catches case where
|
||||
// height is `-1`. Fall through.
|
||||
if (height >= prev.height + 1)
|
||||
return false;
|
||||
if (height !== -1) {
|
||||
if (height >= prev.height + 1)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (time === -1)
|
||||
return true;
|
||||
if (time !== -1) {
|
||||
const mtp = await this.getMedianTime(prev);
|
||||
|
||||
const mtp = await this.getMedianTime(prev);
|
||||
|
||||
if (time >= mtp)
|
||||
return false;
|
||||
if (time >= mtp)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user