Skip to content

Commit 2a16578

Browse files
committed
Temporary: still send/receive 'havewitness' to/from old nodes
1 parent 10c9b15 commit 2a16578

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
@@ -4589,6 +4589,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
45894589
pfrom->PushMessage(NetMsgType::SENDHEADERS);
45904590
}
45914591

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

45944598

@@ -4664,6 +4668,13 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
46644668
State(pfrom->GetId())->fPreferHeaders = true;
46654669
}
46664670

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

0 commit comments

Comments
 (0)