Skip to content

smite: move ChannelTypeVariant to bolt::types - #234

Open
NishantBansal2003 wants to merge 1 commit into
lnfuzz:masterfrom
NishantBansal2003:move-channel-type
Open

smite: move ChannelTypeVariant to bolt::types#234
NishantBansal2003 wants to merge 1 commit into
lnfuzz:masterfrom
NishantBansal2003:move-channel-type

Conversation

@NishantBansal2003

Copy link
Copy Markdown
Contributor

The accept_channel oracle needs to verify that channel_type uses the smallest possible bitmap and represents a defined channel type. Keeping ChannelTypeVariant in bolt::types gives the oracle a canonical set of channel types to validate against and avoids duplicating the definition across modules.

This commit was part of #209, but I thought of separating some of the code-move changes to keep the diff smaller. So this is mostly a code-move change with a few small code changes

The `accept_channel` oracle needs to verify that `channel_type`
uses the smallest possible bitmap and represents a defined
channel type. Keeping `ChannelTypeVariant` in `bolt::types`
gives the oracle a canonical set of channel types to validate
against and avoids duplicating the definition across modules.

Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
@Chand-ra

Chand-ra commented Sep 5, 2026

Copy link
Copy Markdown

The refactor preserves everything besides the newly added ChannelTypeVariant::to_features method, so LGTM.

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