Skip to content

Commit 590d715

Browse files
committed
Temporary: still send/receive 'havewitness' to/from old nodes
1 parent b002a8c commit 590d715

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4591,6 +4591,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
45914591
pfrom->PushMessage(NetMsgType::SENDHEADERS);
45924592
}
45934593

4594+
// Temporary hack to make old segnet nodes not fail (needed because we switched to a service bit instead)
4595+
if (pfrom->nVersion >= WITNESS_VERSION) {
4596+
pfrom->PushMessage("havewitness");
4597+
}
45944598
}
45954599

45964600

@@ -4666,6 +4670,13 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
46664670
State(pfrom->GetId())->fPreferHeaders = true;
46674671
}
46684672

4673+
// Temporary hack to make old segnet nodes not fail (needed because we switched to a service bit instead)
4674+
else if (strCommand == "havewitness")
4675+
{
4676+
LOCK(cs_main);
4677+
State(pfrom->GetId())->fHaveWitness = true;
4678+
}
4679+
46694680
else if (strCommand == NetMsgType::INV)
46704681
{
46714682
vector<CInv> vInv;

0 commit comments

Comments
 (0)