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

Fix: Remove neighbors correctly #1687

Merged
merged 3 commits into from
Jan 5, 2020

Conversation

acha-bill
Copy link
Contributor

Description

If the node has attempted to add a neighbour whether successfully or not, then removing the neighbour should return 'ok'.

Fixes #1586

Type of change

  • Bug fix (a non-breaking change which fixes an issue)

How Has This Been Tested?

  • Unit tests pass

Checklist:

  • My code follows the style guidelines for this project
  • I have performed a self-review of my own code
  • I have commented on my code, particularly in hard-to-understand areas

Copy link
Contributor

@GalRogozinski GalRogozinski left a comment

Choose a reason for hiding this comment

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

Looks good just a couple of changes

Comment on lines 785 to 786
boolean isSeen = reconnectPool.contains(neighborURI);
reconnectPool.remove(neighborURI);
Copy link
Contributor

Choose a reason for hiding this comment

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

boolean isSeen = reconnectPool.remove(neighborURI);

if (neighbor == null) {
if(isSeen){
Copy link
Contributor

Choose a reason for hiding this comment

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

please auto-format this line

@GalRogozinski GalRogozinski merged commit c566e34 into iotaledger:dev Jan 5, 2020
@GalRogozinski GalRogozinski changed the title Remove neighbours Fix: Remove neighbors correctly Jan 5, 2020
@GalRogozinski GalRogozinski mentioned this pull request May 6, 2020
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.

When removing existing neighbor IRI claims none have been removed
2 participants