lightningd: pass signed tx through to close callback.

Thread the signed tx through so close's JSON return contains that,
rather than the unsigned channel->last_tx.

We have to split the "get cmd_id" from "resolve the close commands" though;
and of course, as before, we don't actually print the txids of multiple
transactions even though we may have multi in flight due to splice!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: JSON-RPC: `close` returns a `tx` field with witness data populated (i.e. signed).
Fixes: #6440
This commit is contained in:
Rusty Russell
2023-07-31 21:03:22 +09:30
parent d90a185188
commit e981a4f14a
6 changed files with 60 additions and 38 deletions

View File

@@ -3872,7 +3872,6 @@ def test_htlc_no_force_close(node_factory, bitcoind, anchors):
# FIXME: l2 should complain!
@pytest.mark.xfail(strict=True)
@pytest.mark.developer("needs dev-no-reconnect")
def test_closing_tx_valid(node_factory, bitcoind):
l1, l2 = node_factory.line_graph(2, opts={'may_reconnect': True,