Skip to content

Remove APIs which use peer index as channel index - #542

Merged
johanhelsing merged 1 commit into
johanhelsing:mainfrom
Craig-Macomber:remove-broken
Feb 20, 2026
Merged

Remove APIs which use peer index as channel index#542
johanhelsing merged 1 commit into
johanhelsing:mainfrom
Craig-Macomber:remove-broken

Conversation

@Craig-Macomber

Copy link
Copy Markdown
Contributor

Since channels are internally organized by index, not peer, there isn't an easy way to implement taking channels for a single peer. Thus this simple removes the incorrectly implemented APIs rather than trying to fix them.

@johanhelsing johanhelsing left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Sounds like the right call. I'm not sure who added it, and when, but it probably never worked.

@Craig-Macomber

Copy link
Copy Markdown
Contributor Author

Sounds like the right call. I'm not sure who added it, and when, but it probably never worked.

The bug seems to have been introduced in 62c783c, which converted the method added in 414f973 to be bugged differently.

I think what was missing in those attempts is the fact that if you want to get a raw channel to a single peer, one must take either the channel, then take a peer from the WebRtcChannel.

Implementing that might actually be the easiest way to exposing the a clean async interface with back-pressure I want, though I'll try and make it practical to unit test such a setup before I go to implement it.

@johanhelsing
johanhelsing merged commit 6fcc0a0 into johanhelsing:main Feb 20, 2026
10 checks passed
@Craig-Macomber
Craig-Macomber deleted the remove-broken branch February 21, 2026 00:31
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