Skip to content

Commit 38762f7

Browse files
Merge #6574: fix: ReconnectionInfo should also store Dash-specific flags
17f0aa3 fix: ReconnectionInfo should also store Dash-specific flags (UdjinM6) Pull request description: ## Issue being fixed or feature implemented Mixing with p2p v2 protocol enabled on p2p v1 masternodes triggers reconnection which "forgets" about Dash-specific flags so these connections aren't dropped on mixing session timeouts like they should. Most nodes on testnet are upgraded so the issue wasn't noticeable there unfortunately. ## What was done? Store Dash-specific flags in `ReconnectionInfo` and use them in `PerformReconnections()` later ## How Has This Been Tested? ## Breaking Changes n/a ## Checklist: - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: kwvg: ACK 17f0aa3 PastaPastaPasta: utACK 17f0aa3 Tree-SHA512: eb69716e79acc29529b900900d284ddd2d6565d847b1039194c8764fa4575a7a8f51e95b733dc58a550819f9cf5be11de759ceb6884ce44723ede912231cc574
1 parent 580b74c commit 38762f7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/net.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,9 @@ void CConnman::DisconnectNodes()
22472247
.grant = std::move(pnode->grantOutbound),
22482248
.destination = pnode->m_dest,
22492249
.conn_type = pnode->m_conn_type,
2250-
.use_v2transport = false});
2250+
.use_v2transport = false,
2251+
.masternode_connection = pnode->m_masternode_connection,
2252+
.masternode_probe_connection = pnode->m_masternode_probe_connection});
22512253
LogPrint(BCLog::NET, "retrying with v1 transport protocol for peer=%d\n", pnode->GetId());
22522254
}
22532255

@@ -5171,7 +5173,9 @@ void CConnman::PerformReconnections()
51715173
std::move(item.grant),
51725174
item.destination.empty() ? nullptr : item.destination.c_str(),
51735175
item.conn_type,
5174-
item.use_v2transport);
5176+
item.use_v2transport,
5177+
item.masternode_connection ? MasternodeConn::IsConnection : MasternodeConn::IsNotConnection,
5178+
item.masternode_probe_connection ? MasternodeProbeConn::IsConnection : MasternodeProbeConn::IsNotConnection);
51755179
}
51765180
}
51775181

src/net.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,6 +1981,8 @@ friend class CNode;
19811981
std::string destination;
19821982
ConnectionType conn_type;
19831983
bool use_v2transport;
1984+
bool masternode_connection;
1985+
bool masternode_probe_connection;
19841986
};
19851987

19861988
/**

0 commit comments

Comments
 (0)