aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net_processing.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index d9c615c4be..f7c51ab6ab 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -2891,17 +2891,15 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
// fProvidesHeaderAndIDs is used to "lock in" version of compact blocks we send (fWantsCmpctWitness)
if (!State(pfrom.GetId())->fProvidesHeaderAndIDs) {
State(pfrom.GetId())->fProvidesHeaderAndIDs = true;
- State(pfrom.GetId())->fWantsCmpctWitness = nCMPCTBLOCKVersion == 2;
+ State(pfrom.GetId())->fWantsCmpctWitness = true;
}
- if (State(pfrom.GetId())->fWantsCmpctWitness == (nCMPCTBLOCKVersion == 2)) { // ignore later version announces
+ if (State(pfrom.GetId())->fWantsCmpctWitness) {
State(pfrom.GetId())->fPreferHeaderAndIDs = fAnnounceUsingCMPCTBLOCK;
// save whether peer selects us as BIP152 high-bandwidth peer
// (receiving sendcmpct(1) signals high-bandwidth, sendcmpct(0) low-bandwidth)
pfrom.m_bip152_highbandwidth_from = fAnnounceUsingCMPCTBLOCK;
}
- if (!State(pfrom.GetId())->fSupportsDesiredCmpctVersion) {
- State(pfrom.GetId())->fSupportsDesiredCmpctVersion = (nCMPCTBLOCKVersion == 2);
- }
+ State(pfrom.GetId())->fSupportsDesiredCmpctVersion = true;
return;
}