Skip to content

Conversation

@xdustinface
Copy link
Collaborator

@xdustinface xdustinface commented Feb 8, 2026

We already clone self two times to make the connect_fn happen. So this PR just clones self and moves it into the task, getting rid of all extra variables and connect_fn. Just to simplify it.

Based on:

We currently only use the stored peers for the initial connection attempts. This PR:
- Loads the stored peers into the `AddrV2Handler`.
- Drops the initial connection attempts in `PeerNetworkManager.start` to let the maintenance loop handle it.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 8, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/self-in-run-loop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@xdustinface xdustinface force-pushed the refactor/self-in-run-loop branch from 4cf4f37 to b30c78c Compare February 8, 2026 14:35
Use a `tokio::time::Interval` in the maintenance loop's `select!`
instead of manual `SystemTime` elapsed tracking.
The interval arm is disabled in exclusive mode via a select guard and
skips DNS if peers are already enough.

Also, the DNS lookup branch doesn't try to connect immediately but instead in the next loop cycle, which happens straight away.
@xdustinface xdustinface force-pushed the refactor/peer-search-started branch from ada9bcc to 5601598 Compare February 8, 2026 15:02
@github-actions github-actions bot added the merge-conflict The PR conflicts with the target branch. label Feb 8, 2026
@github-actions
Copy link

github-actions bot commented Feb 8, 2026

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

We already clone `self` two times to make the `connect_fn` happen. So this PR just clones `self` and moves it into the task, getting rid of all extra variables and `connect_fn`. Just to simplify it.
@xdustinface xdustinface force-pushed the refactor/self-in-run-loop branch from b30c78c to 9e299da Compare February 8, 2026 18:22
@github-actions github-actions bot removed the merge-conflict The PR conflicts with the target branch. label Feb 8, 2026
@xdustinface xdustinface force-pushed the refactor/peer-search-started branch from 5601598 to a8a124f Compare February 9, 2026 23:13
@github-actions
Copy link

github-actions bot commented Feb 9, 2026

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

@github-actions github-actions bot added the merge-conflict The PR conflicts with the target branch. label Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-conflict The PR conflicts with the target branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant