mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Merge bitcoin/bitcoin#21090: Default to NODE_WITNESS in nLocalServices
a806647d26[validation] Always include merkle root in coinbase commitment (Dhruv Mehta)189128c220[validation] Set witness script flag with p2sh for blocks (Dhruv Mehta)ac82b99db7[p2p] remove redundant NODE_WITNESS checks (Dhruv Mehta)6f8b198b82[p2p] remove unused segwitheight=-1 option (Dhruv Mehta)eba5b1cd64[test] remove or move tests using `-segwitheight=-1` (Dhruv Mehta) Pull request description: Builds on #21009 and makes progress on remaining items in #17862 Removing `RewindBlockIndex()` in #21009 allows the following: - removal of tests using `segwitheight=-1` in `p2p_segwit.py`. - move `test_upgrade_after_activation()` out of `p2p_segwit.py` reducing runtime - in turn, that allows us to drop support for `-segwitheight=-1`, which is only supported for that test. - that allows us to always set `NODE_WITNESS` in our local services. The only reason we don't do that is to support `-segwitheight=-1`. - that in turn allows us to drop all of the `GetLocalServices() & NODE_WITNESS` checks inside `net_processing.cpp`, since our local services would always include `NODE_WITNESS` ACKs for top commit: mzumsande: Code-Review ACKa806647d26laanwj: Code review ACKa806647d26, nice cleanup jnewbery: utACKa806647d26theStack: ACKa806647d26Tree-SHA512: 73e1a69d1d7eca1f5c38558ec6672decd0b60b16c2ef6134df6f6af71bb159e6eea160f9bb5ab0eb6723c6632d29509811e29469d0d87abbe9b69a2890fbc73e
This commit is contained in:
@@ -715,7 +715,7 @@ namespace { // Variables internal to initialization process only
|
||||
int nMaxConnections;
|
||||
int nUserMaxConnections;
|
||||
int nFD;
|
||||
ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK | NODE_NETWORK_LIMITED);
|
||||
ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK | NODE_NETWORK_LIMITED | NODE_WITNESS);
|
||||
int64_t peer_connect_timeout;
|
||||
std::set<BlockFilterType> g_enabled_filter_types;
|
||||
|
||||
@@ -1588,12 +1588,6 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
}
|
||||
}
|
||||
|
||||
if (DeploymentEnabled(chainparams.GetConsensus(), Consensus::DEPLOYMENT_SEGWIT)) {
|
||||
// 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);
|
||||
}
|
||||
|
||||
// ********************************************************* Step 11: import blocks
|
||||
|
||||
if (!CheckDiskSpace(gArgs.GetDataDirNet())) {
|
||||
|
||||
Reference in New Issue
Block a user