mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 13:37:24 +00:00
Enable CHECKLOCKTIMEVERIFY on version 4 blocks after a 75% majority.
This commit is contained in:
committed by
Andreas Schildbach
parent
70f557a514
commit
ff2e057126
@@ -510,6 +510,14 @@ public abstract class NetworkParameters {
|
||||
final EnumSet<Script.VerifyFlag> verifyFlags = EnumSet.noneOf(Script.VerifyFlag.class);
|
||||
if (block.getTimeSeconds() >= NetworkParameters.BIP16_ENFORCE_TIME)
|
||||
verifyFlags.add(Script.VerifyFlag.P2SH);
|
||||
|
||||
// Start enforcing CHECKLOCKTIMEVERIFY, (BIP65) for block.nVersion=4
|
||||
// blocks, when 75% of the network has upgraded:
|
||||
if (block.getVersion() >= Block.BLOCK_VERSION_BIP65 &&
|
||||
tally.getCountAtOrAbove(Block.BLOCK_VERSION_BIP65) > this.getMajorityEnforceBlockUpgrade()) {
|
||||
verifyFlags.add(Script.VerifyFlag.CHECKLOCKTIMEVERIFY);
|
||||
}
|
||||
|
||||
return verifyFlags;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user