mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
net: Send post-verack handshake messages at most once
This commit is contained in:
parent
ec0453cd57
commit
fa1f6f237d
1 changed files with 3 additions and 2 deletions
|
|
@ -2555,8 +2555,9 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat
|
||||||
// At this point, the outgoing message serialization version can't change.
|
// At this point, the outgoing message serialization version can't change.
|
||||||
const CNetMsgMaker msgMaker(pfrom.GetCommonVersion());
|
const CNetMsgMaker msgMaker(pfrom.GetCommonVersion());
|
||||||
|
|
||||||
if (msg_type == NetMsgType::VERACK)
|
if (msg_type == NetMsgType::VERACK) {
|
||||||
{
|
if (pfrom.fSuccessfullyConnected) return;
|
||||||
|
|
||||||
if (!pfrom.IsInboundConn()) {
|
if (!pfrom.IsInboundConn()) {
|
||||||
// Mark this node as currently connected, so we update its timestamp later.
|
// Mark this node as currently connected, so we update its timestamp later.
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue