Skip to content

fix: use getChannel instead of getConnection for channel queries#1244

Open
Lil-Duckling-22 wants to merge 1 commit intocosmos:mainfrom
Lil-Duckling-22:fix/channel-query-method
Open

fix: use getChannel instead of getConnection for channel queries#1244
Lil-Duckling-22 wants to merge 1 commit intocosmos:mainfrom
Lil-Duckling-22:fix/channel-query-method

Conversation

@Lil-Duckling-22
Copy link

Motivation

The channel handshake logic in pendingDatagrams incorrectly uses getConnection() with a non-existent counterpartyIdentifier field when querying channels. This breaks the example code since ChannelEnd doesn't have counterpartyIdentifier—it uses counterpartyPortIdentifier and counterpartyChannelIdentifier.

Solution

Replace counterparty.getConnection(localEnd.counterpartyIdentifier) with counterparty.getChannel(localEnd.counterpartyPortIdentifier, localEnd.counterpartyChannelIdentifier) to correctly query the counterparty channel end using the proper method and fields from the ChannelEnd structure.

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.

1 participant