mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
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:
@@ -8,11 +8,13 @@ struct channel;
|
||||
struct lightningd;
|
||||
struct peer_fd;
|
||||
|
||||
/* Resolve a close command for a channel that will be closed soon: returns
|
||||
* the cmd_id of one, if any (allocated off ctx). */
|
||||
const char *resolve_close_command(const tal_t *ctx,
|
||||
struct lightningd *ld, struct channel *channel,
|
||||
bool cooperative);
|
||||
/* Find cmd_id for closing command, if any. */
|
||||
const char *cmd_id_from_close_command(const tal_t *ctx,
|
||||
struct lightningd *ld, struct channel *channel);
|
||||
|
||||
/* Resolve a close command for a channel that will be closed soon. */
|
||||
void resolve_close_command(struct lightningd *ld, struct channel *channel,
|
||||
bool cooperative, const struct bitcoin_tx *close_tx);
|
||||
|
||||
void peer_start_closingd(struct channel *channel,
|
||||
struct peer_fd *peer_fd);
|
||||
|
||||
Reference in New Issue
Block a user