Skip to content

Enable dynamic fee management for new channels - #558

Merged
markettes merged 2 commits into
mainfrom
fix/dynamic-fee-auto-enable
Aug 6, 2026
Merged

Enable dynamic fee management for new channels#558
markettes merged 2 commits into
mainfrom
fix/dynamic-fee-auto-enable

Conversation

@markettes

@markettes markettes commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Introduce dynamic fee management for newly created channels when the node has dynamic fee enabled, allowing for more flexible fee handling based on node settings. This change enhances the channel creation and update processes to incorporate dynamic fee capabilities.

@markettes
markettes requested review from Jossec101 and a lite review from Copilot August 5, 2026 17:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enables dynamic fee management by default on newly created/discovered channels, based on the managed node’s DynamicFeeManagementEnabled setting, so the routing fee engine can pick up eligible channels without manual per-channel toggling.

Changes:

  • Set Channel.IsDynamicFeeEnabled when persisting channels created via LightningService.CreateChannel(...).
  • Set Channel.IsDynamicFeeEnabled when persisting channels discovered via NodeChannelSubscribeJob open-channel events.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Services/LightningService.cs Marks newly persisted channels as dynamic-fee-enabled based on the source node’s dynamic fee setting.
src/Jobs/NodeChannelSubscribeJob.cs Marks newly discovered channels as dynamic-fee-enabled during channel open event handling.
Suppressed comments (1)

src/Jobs/NodeChannelSubscribeJob.cs:129

  • This change introduces new behavior (auto-setting IsDynamicFeeEnabled on newly observed channels) but the existing NodeChannelSubscribeJobTests don’t assert anything about the dynamic-fee flag. Adding a test that captures the channel passed to _channelRepository.AddAsync(...) would prevent regressions, especially for the managed-node de-dup case.
                    IsPrivate = channelOpened.Private,
                    IsDynamicFeeEnabled = node.DynamicFeeManagementEnabled

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Services/LightningService.cs
Comment thread src/Jobs/NodeChannelSubscribeJob.cs
Jossec101
Jossec101 previously approved these changes Aug 6, 2026
@markettes
markettes merged commit b4d4614 into main Aug 6, 2026
5 checks passed
@markettes
markettes deleted the fix/dynamic-fee-auto-enable branch August 6, 2026 15:15
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.

3 participants