state.hasMTP.
This commit is contained in:
parent
4b7d4a3c8d
commit
c8dc5901ec
@ -593,9 +593,7 @@ Chain.prototype._verify = function _verify(block, prev, callback) {
|
||||
}
|
||||
|
||||
// Get timestamp for tx.isFinal().
|
||||
ts = (state.lockFlags & constants.flags.MEDIAN_TIME_PAST) !== 0
|
||||
? medianTime
|
||||
: block.ts;
|
||||
ts = state.hasMTP() ? medianTime : block.ts;
|
||||
|
||||
// Check all transactions
|
||||
for (i = 0; i < block.txs.length; i++) {
|
||||
@ -2546,6 +2544,15 @@ DeploymentState.prototype.hasCLTV = function hasCLTV() {
|
||||
return (this.flags & constants.flags.VERIFY_CHECKLOCKTIMEVERIFY) !== 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Test whether median time past locktime is active.
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
|
||||
DeploymentState.prototype.hasMTP = function hasMTP() {
|
||||
return (this.lockFlags & constants.flags.MEDIAN_TIME_PAST) !== 0
|
||||
};
|
||||
|
||||
/**
|
||||
* Test whether csv is active.
|
||||
* @returns {Boolean}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user