In the https://github.com/bitcoin/bitcoin/blob/master/src/net_processing.cpp void PeerManagerImpl::FindNextBlocksToDownload(.....) ...... for (const CBlockIndex* pindex : vToFetch) { if (!pindex->IsValid(BLOCK_VALID_TREE)) { // We consider the chain that this peer is on invalid. return; } if (!State(nodeid)->fHaveWitness && DeploymentActiveAt(*pindex, consensusParams, Consensus::DEPLOYMENT_SEGWIT)) { // We wouldn't download this block or its descendants from this peer. return; } ...... In fact, the State(nodeid) returns variable is already initialized at the beginning of the function, there is no need to repeat the call here. In addition, the fHaveWitness is only set in the NetMsgType::VERSION phase.
-
guoyl commented at 3:23 AM on April 27, 2022: none
-
MarcoFalke commented at 6:28 AM on April 27, 2022: member
Pretty sure this will be fixed as part of #19398
- MarcoFalke closed this on Apr 27, 2022
- DrahtBot locked this on Apr 27, 2023
Contributors