Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

use p2p address for duplicate connection resolution #10006

Merged
merged 2 commits into from
Feb 10, 2021

Conversation

huangminghuang
Copy link
Contributor

Change Description

This PR fixes the problem where two nodeos establish p2p connections to each other, send go away messages to each other at the same time and then both connections are dropped without any retry.

Change Type

Select ONE:

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Testing Changes

Select ANY that apply:

  • New Tests
  • Existing Tests
  • Test Framework
  • CI System
  • Other

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

Copy link
Contributor

@brianjohnson5972 brianjohnson5972 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add that one comment and it is good.

}
else if (my_impl->p2p_address < msg.p2p_address) {
continue;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like a comment like "only the p2p node with the higher of the 2 addresses will decide which connection is a duplicate, so there is no chance for both connections to be closed"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants