aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2019-05-20 14:59:07 -0400
committerJohn Newbery <john@johnnewbery.com>2019-08-14 15:52:52 -0400
commit0328dcdcfcb56dc8918697716d7686be048ad0b3 (patch)
treec4c4bed225e5d08d9af5f007941ab5261147e256 /src/init.cpp
parent1c93b9b31c2ab7358f9d55f52dd46340397c906d (diff)
[Consensus] Bury segwit deployment
Hardcode segwit deployment height to 481824 for mainnet.
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/init.cpp b/src/init.cpp
index bb3ff8d88f..ab48dd4200 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1670,12 +1670,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);
}