Skip to content

Commit

Permalink
net: Send post-verack handshake messages at most once
Browse files Browse the repository at this point in the history
Github-Pull: bitcoin#20146
Rebased-From: fa1f6f2
  • Loading branch information
MarcoFalke authored and fanquake committed Oct 19, 2020
1 parent bdf15d0 commit 6113b54
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2119,6 +2119,8 @@ bool ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStream& vRec

if (msg_type == NetMsgType::VERACK)
{
if (pfrom->fSuccessfullyConnected) return true;

pfrom->SetRecvVersion(std::min(pfrom->nVersion.load(), PROTOCOL_VERSION));

if (!pfrom->fInbound) {
Expand Down

0 comments on commit 6113b54

Please sign in to comment.