Skip to content

Commit

Permalink
p2p: ignore peers sending post-verack sendaddrv2
Browse files Browse the repository at this point in the history
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
Co-authored-by: Anthony Towns <aj@erisian.com.au>
  • Loading branch information
3 people committed Dec 14, 2020
1 parent e593094 commit 764042e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2524,11 +2524,8 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat
// BIP155 defines feature negotiation of addrv2 and sendaddrv2, which must happen
// between VERSION and VERACK.
if (msg_type == NetMsgType::SENDADDRV2) {
if (pfrom.fSuccessfullyConnected && !m_chainparams.GetConsensus().signet_blocks) {
// Disconnect peers that send a SENDADDRV2 message after VERACK.
// A temporary exception is made for bootstrapping signet support in
// v0.21.0. After 0.21.0, this should be reverted.
pfrom.fDisconnect = true;
if (pfrom.fSuccessfullyConnected) {
// Ignore peers that send a SENDADDRV2 message after VERACK.
return;
}
pfrom.m_wants_addrv2 = true;
Expand Down

0 comments on commit 764042e

Please sign in to comment.