Skip to content

Commit

Permalink
Temporary: still send/receive 'havewitness' to/from old nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Feb 9, 2016
1 parent 10c9b15 commit 2a16578
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4589,6 +4589,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
pfrom->PushMessage(NetMsgType::SENDHEADERS);
}

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


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

// Temporary hack to make old segnet nodes not fail (needed because we switched to a service bit instead)
else if (strCommand == "havewitness")
{
LOCK(cs_main);
State(pfrom->GetId())->fHaveWitness = true;
}

else if (strCommand == NetMsgType::INV)
{
vector<CInv> vInv;
Expand Down

0 comments on commit 2a16578

Please sign in to comment.