diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-08-15 16:02:02 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-08-15 16:02:10 -0400 |
commit | 1bf2ff2bf8e8bef3ba21e635aabb1b0964062743 (patch) | |
tree | 365d1217fc9886ebf0335c7bdbb94ab834b305a9 /src/init.cpp | |
parent | 367b023ae444e7d9641c4a3469f9154461e50e68 (diff) | |
parent | e78aaf41f43d0e2ad78fa6d8dad61032c8ef73d0 (diff) |
Merge #16060: Bury bip9 deployments
e78aaf41f43d0e2ad78fa6d8dad61032c8ef73d0 [docs] Add release notes for burying bip 9 soft fork deployments (John Newbery)
8319e738f9f118025b332e4fa804d4c31e4113f4 [tests] Add coverage for the content of getblockchaininfo.softforks (James O'Beirne)
0328dcdcfcb56dc8918697716d7686be048ad0b3 [Consensus] Bury segwit deployment (John Newbery)
1c93b9b31c2ab7358f9d55f52dd46340397c906d [Consensus] Bury CSV deployment height (John Newbery)
3862e473f0cb71a762c0306b171b591341d58142 [rpc] Tidy up reporting of buried and ongoing softforks (John Newbery)
Pull request description:
This hardcodes CSV and segwit activation heights, similar to the BIP 90 buried deployments for BIPs 34, 65 and 66.
CSV and segwit have been active for over 18 months. Hardcoding the activation height is a code simplification, makes it easier to understand segwit activation status, and reduces technical debt.
This was originally attempted by jl2012 in #11398 and again by me in #12360.
ACKs for top commit:
ajtowns:
ACK e78aaf41f43d0e2ad78fa6d8dad61032c8ef73d0 ; checked diff to previous acked commit, checked tests still work
ariard:
ACK e78aaf4, check diff, run the tests again and successfully activated csv/segwit heights on mainnet as expected.
MarcoFalke:
ACK e78aaf41f43d0e2ad78fa6d8dad61032c8ef73d0 (still didn't check if the mainnet block heights are correct, but the code looks good now)
Tree-SHA512: 7e951829106e21a81725f7d3e236eddbb59349189740907bb47e33f5dbf95c43753ac1231f47ae7bee85c8c81b2146afcdfdc11deb1503947f23093a9c399912
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/init.cpp b/src/init.cpp index 8870f379fb..d98f7c3767 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1678,12 +1678,9 @@ bool AppInitMain(InitInterfaces& interfaces) } } - if (chainparams.GetConsensus().vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout != 0) { - // Only advertise witness capabilities if they have a reasonable start time. - // This allows us to have the code merged without a defined softfork, by setting its - // end time to 0. - // Note that setting NODE_WITNESS is never required: the only downside from not - // doing so is that after activation, no upgraded nodes will fetch from you. + if (chainparams.GetConsensus().SegwitHeight != std::numeric_limits<int>::max()) { + // Advertise witness capabilities. + // The option to not set NODE_WITNESS is only used in the tests and should be removed. nLocalServices = ServiceFlags(nLocalServices | NODE_WITNESS); } |