-
Notifications
You must be signed in to change notification settings - Fork 901
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
openchannel: make openchannel hook chainable #3960
Merged
rustyrussell
merged 2 commits into
ElementsProject:master
from
m-schmoock:openchannel-hook-chainable
Sep 7, 2020
Merged
openchannel: make openchannel hook chainable #3960
rustyrussell
merged 2 commits into
ElementsProject:master
from
m-schmoock:openchannel-hook-chainable
Sep 7, 2020
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
m-schmoock
force-pushed
the
openchannel-hook-chainable
branch
from
August 20, 2020 16:19
11b6257
to
aecba6f
Compare
Definitely want this! |
m-schmoock
force-pushed
the
openchannel-hook-chainable
branch
11 times, most recently
from
August 28, 2020 11:10
d411ff3
to
1666f35
Compare
niftynei
reviewed
Aug 28, 2020
m-schmoock
force-pushed
the
openchannel-hook-chainable
branch
8 times, most recently
from
September 3, 2020 11:32
2612dbb
to
b98e80d
Compare
m-schmoock
force-pushed
the
openchannel-hook-chainable
branch
from
September 3, 2020 13:14
b98e80d
to
dbbad65
Compare
cdecker
reviewed
Sep 6, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor nits and cleanups. Otherwise good work 👍
cdecker
approved these changes
Sep 6, 2020
ACK dbbad65 |
This will make the `openchannel_hook` chainable. Logic is as follows: - The first plugin that rejects terminates the chain - If more than one plugin uses the `close_to` parameter, take the first value and log_unusual for the others. Changelog-Added: openchannel_hook is now chainable
m-schmoock
force-pushed
the
openchannel-hook-chainable
branch
from
September 6, 2020 13:45
dbbad65
to
e006d19
Compare
Thanks for the fixup @m-schmoock, excellent work 👍 ACK e006d19 |
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 change is required to make the decomission feature possible: #3550
Status: Done. The code is functional and does not seem to have bugs. There is a strange workaround in
tests/test_plugin.py
test_openchannel_hook_chaining
where it needs to check for actual hook execution order in order to have the test stable. this is caused by the way hooks are currently registered, see #4005 for details about this.Question: Currently this change will just log
UNUSUAL
if a second hook also tries to set aclose_to
address and continues normal operation. Question: Is this sufficient or should rather want tofatal
such plugin setups.