forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lightningd: clean up close logic, fix bug where we can't override des…
…tination. Watchtowers changed the code so that we *always* have a channel->shutdown_scriptpubkey[LOCAL] (see new_channel()). The previous code had several problems: 1. It tested this for NULL, unnecessarily. 2. It allowed overriding if it was a default, *even* if we were already using it. 3. If the peer opened without option_shutdown_anysegwit, but upgraded before we closed, we would not recognize the default. 4. It set the final scriptpubkey (and other things!) even if the command failed. Changelog-Fixed: JSON-RPC: `close` with `destination` works even if prior `destination` was rejected. Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information
1 parent
2cf0442
commit dac383a
Showing
2 changed files
with
79 additions
and
103 deletions.
There are no files selected for viewing
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
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