Skip to content
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

Fix close fail retry #7072

Merged

Commits on Feb 14, 2024

  1. pytest: add test for issue ElementsProject#7014

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    6fd0e1a View commit details
    Browse the repository at this point in the history
  2. lightningd: reindent closing_control.c

    Tabs vs spaces, it's weird.  No code changes.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    5e328e3 View commit details
    Browse the repository at this point in the history
  3. common: add tal_arr_eq helper.

    We do `memeq(a, tal_bytelen(a), b, tal_bytelen(b))` remarkably often...
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    dee15a9 View commit details
    Browse the repository at this point in the history
  4. 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 <rusty@rustcorp.com.au>
    rustyrussell committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    1f1daaa View commit details
    Browse the repository at this point in the history
  5. lightningd: add --dev-allow-shutdown-destination-change to unstick ex…

    …isting nodes.
    
    This will solve the problem for users who already hit the bug fixed by
    the previous patch!
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    9376425 View commit details
    Browse the repository at this point in the history