Skip to content

Commit 0e20cfe

Browse files
committed
Disconnect peers sending wtxidrelay message after VERACK
1 parent cacd852 commit 0e20cfe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/net_processing.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2506,6 +2506,12 @@ void ProcessMessage(
25062506
// Feature negotiation of wtxidrelay should happen between VERSION and
25072507
// VERACK, to avoid relay problems from switching after a connection is up
25082508
if (msg_type == NetMsgType::WTXIDRELAY) {
2509+
if (pfrom.fSuccessfullyConnected) {
2510+
// Disconnect peers that send wtxidrelay message after VERACK; this
2511+
// must be negotiated between VERSION and VERACK.
2512+
pfrom.fDisconnect = true;
2513+
return;
2514+
}
25092515
if (pfrom.nVersion >= WTXID_RELAY_VERSION) {
25102516
LOCK(cs_main);
25112517
if (!State(pfrom.GetId())->m_wtxid_relay) {

0 commit comments

Comments
 (0)