diff options
author | shaolinfry <shaolinfry@users.noreply.github.com> | 2017-03-28 18:04:22 +0100 |
---|---|---|
committer | shaolinfry <shaolinfry@protonmail.ch> | 2017-03-28 18:14:10 +0100 |
commit | 60d4b512b8ca9d57b479a5ee63c6825415ac0b20 (patch) | |
tree | 5428e460ddee76444e3e3c6f7bc3994e3d46b617 /bip-0148.mediawiki | |
parent | 6925e66aa092d97f8273e4bab15bb0d4c63f9ac9 (diff) |
Update BIP148
Adjust start time to Aug 1st 2017
Fix code sample logic.
Diffstat (limited to 'bip-0148.mediawiki')
-rw-r--r-- | bip-0148.mediawiki | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bip-0148.mediawiki b/bip-0148.mediawiki index 767c084..13ad4cd 100644 --- a/bip-0148.mediawiki +++ b/bip-0148.mediawiki @@ -30,16 +30,21 @@ It is hoped that miners will respond to this BIP by activating segwit early, bef All times are specified according to median past time. -This BIP will be activate between midnight October 1st 2017 (epoch time 1506816000) and midnight November 15th 2017 (epoch time 1510704000) if the existing segwit deployment is not activated before epoch time 1506816000. This BIP will cease to be active when the existing segwit deployment activates. +This BIP will be activate between midnight August 1st 2017 (epoch time 1501545600) and midnight November 15th 2017 (epoch time 1510704000) if the existing segwit deployment is not activated before epoch time 1501545600. This BIP will cease to be active when the existing segwit deployment activates. While this BIP is active, all blocks must set the nVersion header top 3 bits to 001 together with bit field (1<<1) (according to the existing segwit deployment). Blocks that do not signal as required will be rejected. === Reference implementation === <pre> -// mandatory segwit activation between Oct 1st 2017 and Nov 15th 2017 inclusive -if (pindex->GetMedianTimePast() >= 1506816000 && pindex->GetMedianTimePast() <= 1510704000 && !IsWitnessEnabled(pindex->pprev, chainparams.GetConsensus())) { - if (!((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && (pindex->nVersion & VersionBitsMask(chainparams.GetConsensus(), Consensus::DEPLOYMENT_SEGWIT)) != 0) { +// BIP148 mandatory segwit signalling. +if (pindex->GetMedianTimePast() >= 1501545600 && // Tue 1 Aug 2017 00:00:00 UTC + pindex->GetMedianTimePast() <= 1510704000 && // Wed 15 Nov 2017 00:00:00 UTC + !IsWitnessEnabled(pindex->pprev, chainparams.GetConsensus())) +{ + // versionbits topbit and segwit flag must be set. + if ((pindex->nVersion & VERSIONBITS_TOP_MASK) != VERSIONBITS_TOP_BITS || + (pindex->nVersion & VersionBitsMask(chainparams.GetConsensus(), Consensus::DEPLOYMENT_SEGWIT)) == 0) { return state.DoS(0, error("ConnectBlock(): relayed block must signal for segwit, please upgrade"), REJECT_INVALID, "bad-no-segwit"); } } |