Allow changing ChannelManager::default_configuration at runtime#4038
Allow changing ChannelManager::default_configuration at runtime#4038tnull merged 2 commits intolightningdevkit:mainfrom
Conversation
In the next commit we'll add the ability to update the default configuration used for new channels and which controls some global decisions in the `ChannelManager`. However, first, we have to put it behind a mutex so that it can be updated at runtime, which we do here. We also take this opportunity to rename `default_configuration` to simply `config`, since it has been more than only the default configuration for new channels for some time.
The `UserConfig` is used to set the default configuration on new channels and also controls some global behavior in `ChannelManager`, so should probably be updatable without restarting the node. Here we add such a method. We also take this opportunity to rename the `UserConfig` related methods and update their docs since `UserConfig` has been more than just the default configuration for new channels for some time. Fixes lightningdevkit#2420
|
I've assigned @tnull as a reviewer! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4038 +/- ##
==========================================
- Coverage 88.74% 88.73% -0.02%
==========================================
Files 176 176
Lines 129012 129039 +27
Branches 129012 129039 +27
==========================================
+ Hits 114491 114500 +9
- Misses 11926 11941 +15
- Partials 2595 2598 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tnull
left a comment
There was a problem hiding this comment.
Hmm, I somehow had remembered that this wasn't as trival as some config values couldn't be changed during runtime without exposing risky behavior. However, given that I can't fully recall what this was about, and that I couldn't pinpoint any cases in the code, it probably means I was misremembering or they are gone by now.
Changes themselves look straightforward, so landing this for now.
|
👋 The first review has been submitted! Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer. |
Fixes #2420