Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: stop auto removing peers #2199

Merged
merged 2 commits into from
Sep 6, 2024
Merged

fix: stop auto removing peers #2199

merged 2 commits into from
Sep 6, 2024

Conversation

Jasonvdb
Copy link
Collaborator

@Jasonvdb Jasonvdb commented Sep 5, 2024

Description

removeUnusedPeers was added a few years back to avoid connecting to peers that wallet did not have a channel with or was not a Blocktank node. On restore this was being triggered before syncing channels with redux state so it was removing peers before realising there was actually an active channel.

I think auto dropping peers might be a bit premature of an optimisation so I moved it to a manual button for now. A user might have the intention of adding a peer and opening a channel with that peer at a later stage and with this method the peer would be removed on each start up.

Linked Issues/Tasks

https://github.com/orgs/synonymdev/projects/12/views/1?pane=issue&itemId=69388158

synonymdev/react-native-ldk#259

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (improving code without creating new functionality)

Tests

  • Detox test
  • Unit test
  • No test

Screenshot / Video

Insert relevant screenshot / recording

QA Notes

After adding an external peer, restore from remote backup and peer should still be there. Or if there was a channel from another LSP it should still be usable.

@limpbrains
Copy link
Collaborator

I've merged this PR into my #2051 PR with tests. They are still failing

@Jasonvdb Jasonvdb merged commit 05be4de into master Sep 6, 2024
7 checks passed
@limpbrains limpbrains deleted the remove-unused-peers branch September 6, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants