Skip to content

Commit 1a8a9fe

Browse files
committed
Temporary: still send/receive 'havewitness' to/from old nodes
1 parent cf18326 commit 1a8a9fe

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

4587+
// Temporary hack to make old segnet nodes not fail (needed because we switched to a service bit instead)
4588+
if (pfrom->nVersion >= WITNESS_VERSION) {
4589+
pfrom->PushMessage("havewitness");
4590+
}
45874591
}
45884592

45894593

@@ -4659,6 +4663,13 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
46594663
State(pfrom->GetId())->fPreferHeaders = true;
46604664
}
46614665

4666+
// Temporary hack to make old segnet nodes not fail (needed because we switched to a service bit instead)
4667+
else if (strCommand == "havewitness")
4668+
{
4669+
LOCK(cs_main);
4670+
State(pfrom->GetId())->fHaveWitness = true;
4671+
}
4672+
46624673
else if (strCommand == NetMsgType::INV)
46634674
{
46644675
vector<CInv> vInv;

0 commit comments

Comments
 (0)