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

Give feedback notifications on closing negotiation when we use feerange #4784

Merged
merged 4 commits into from
Sep 15, 2021

Commits on Sep 13, 2021

  1. lightningd: fix leak report when close called multiple times.

    ```
    Global errors:
     - Node /tmp/ltests-odpd7qtt/test_close_twice_1/lightning-1/ has memory leaks: [
        {
            "backtrace": [
                "ccan/ccan/tal/tal.c:442 (tal_alloc_)",
                "ccan/ccan/tal/tal.c:471 (tal_alloc_arr_)",
                "lightningd/peer_control.c:1673 (param_feerate_range)",
                "common/param.c:43 (make_callback)",
                "common/param.c:140 (parse_by_name)",
                "common/param.c:259 (param_arr)",
                "common/param.c:344 (param)",
                "lightningd/peer_control.c:1706 (json_close)",
                "lightningd/jsonrpc.c:643 (command_exec)",
                "lightningd/jsonrpc.c:778 (rpc_command_hook_final)",
                "lightningd/plugin_hook.c:280 (plugin_hook_call_)",
                "lightningd/jsonrpc.c:866 (plugin_hook_call_rpc_command)",
                "lightningd/jsonrpc.c:965 (parse_request)",
                "lightningd/jsonrpc.c:1056 (read_json)",
                "ccan/ccan/io/io.c:59 (next_plan)",
                "ccan/ccan/io/io.c:407 (do_plan)",
                "ccan/ccan/io/io.c:417 (io_ready)",
                "ccan/ccan/io/poll.c:445 (io_loop)",
                "lightningd/io_loop_with_timers.c:24 (io_loop_with_timers)",
                "lightningd/lightningd.c:1123 (main)"
            ],
            "label": "lightningd/peer_control.c:1673:u32[]",
            "parents": [
                "lightningd/channel.c:372:struct channel"
            ],
            "value": "0x56428b886208"
        }
    ]
    ```
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Sep 13, 2021
    Configuration menu
    Copy the full SHA
    59faa3e View commit details
    Browse the repository at this point in the history
  2. tests: test that successive closes do update parameters (particularly…

    … feerate!).
    
    Noted by @t-bast, this is how it should work, and this tests that it does.
    
    See also: ElementsProject#4777
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Sep 13, 2021
    Configuration menu
    Copy the full SHA
    e240c3f View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2021

  1. lightningd/closing_control.c: move json_close here from peer_control.c

    They share some code, but not much: command_find_channel is made
    non-static.  Rest is move-only.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Sep 15, 2021
    Configuration menu
    Copy the full SHA
    c62d38f View commit details
    Browse the repository at this point in the history
  2. closingd: add notifications for feerate ranges.

    This allows cmdline users to have more idea what's going on.
    
    Inspired-by: ElementsProject#4777
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Changelog-Added: `close` now notifies about the feeranges each side uses.
    rustyrussell committed Sep 15, 2021
    Configuration menu
    Copy the full SHA
    20dbce5 View commit details
    Browse the repository at this point in the history