-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyln: Add a dynamic configs and a callback for changes #7289
Open
cdecker
wants to merge
5
commits into
ElementsProject:master
Choose a base branch
from
cdecker:202405-pyln-setconfig-condition
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
pyln: Add a dynamic configs and a callback for changes #7289
cdecker
wants to merge
5
commits into
ElementsProject:master
from
cdecker:202405-pyln-setconfig-condition
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cdecker
force-pushed
the
202405-pyln-setconfig-condition
branch
from
May 3, 2024 16:47
3a54f18
to
c10e1a9
Compare
I'd love feedback from @rustyrussell and @CGuida on this since it is an alternative to #7288 |
cdecker
force-pushed
the
202405-pyln-setconfig-condition
branch
from
May 3, 2024 23:16
a80ef6c
to
e23bc63
Compare
rustyrussell
force-pushed
the
202405-pyln-setconfig-condition
branch
from
May 9, 2024 06:22
e23bc63
to
d7ea1c7
Compare
Fixed commit message on "fix..." commit. |
rustyrussell
force-pushed
the
202405-pyln-setconfig-condition
branch
from
May 10, 2024 05:26
d7ea1c7
to
0df80c6
Compare
Fixed 'default: null' which cln doesn't like on flag values (if you specify a default, it must be false). |
We didn't actually *change* the value you'd see, when we got a setconfig call! Changelog-Added: pyln-client: implement setconfig hook for plugins so you can see changes in `dynamic` options. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
I was looking into using the `threading.Condition` but since we're already rather heavily using callbacks, this allows us to stay single-threaded, and not having to completely hook the `setconfig` function. Changelog-Added: pyln-client: Added a notification mechanism for config changes
And don't set the value unless it passes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
[ Fix not to include 'value' and 'default' (if None) in getmanifest response --RR ]
cdecker
force-pushed
the
202405-pyln-setconfig-condition
branch
from
May 23, 2024 10:47
0df80c6
to
6cc8d43
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an alternative to #7288, that uses a callback per config
option rather than hooking the
setconfig
function entirely. Thisallows us to react to individual config options changing, while still
maintaining the default
setconfig
behavior.