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

wire: improve connection logic #383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Davidson-Souza
Copy link
Collaborator

What is the purpose of this pull request?

  • Bug fix
  • Documentation update
  • New feature
  • Test
  • Other:

Which crates are being modified?

  • floresta-chain
  • floresta-cli
  • floresta-common
  • floresta-compact-filters
  • floresta-electrum
  • floresta-watch-only
  • floresta-wire
  • floresta
  • florestad
  • Other: .

Description

This commit changes how we select peers to create random connections with unknown addresses, so if we don't have enough good peers, we can try getting finding some instead of just getting stuck.

This commit also opens non-utreexo connections if we don't have any addresses, so we can find some and at least learn about the best chan of headers.

Notes to the reviewers

NA

Checklist

  • I've signed all my commits
  • I ran just lint
  • I ran cargo test
  • I've checked the integration tests
  • I've followed the contribution guidelines
  • I'm linking the issue being fixed by this PR (if any)

@Davidson-Souza Davidson-Souza force-pushed the connections branch 3 times, most recently from 4eb6356 to 2492ee5 Compare February 26, 2025 00:12
Copy link
Contributor

@jaoleal jaoleal left a comment

Choose a reason for hiding this comment

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

LGTM!

Most are comments about docs and nits.

Ill be testing this.

This commit changes how we select peers to create random connections
with unknown addresses, so if we don't have enough good peers, we can
try getting finding some instead of just getting stuck.

This commit also opens non-utreexo connections if we don't have any
addresses, so we can find some and at least learn about the best chan of
headers.
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