Merge 1bf2ff2bf8 into merged_master (Bitcoin PR #16060)

This commit is contained in:
Andrew Poelstra 2020-11-09 21:20:15 +00:00
commit 5f280a6068
22 changed files with 248 additions and 324 deletions

View file

@ -1734,12 +1734,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);
}