diff --git a/lightningd/dual_open_control.c b/lightningd/dual_open_control.c index f033c29e8e4a..81c87955ec8a 100644 --- a/lightningd/dual_open_control.c +++ b/lightningd/dual_open_control.c @@ -3310,6 +3310,7 @@ static void handle_psbt_changed(struct subd *dualopend, struct openchannel2_psbt_payload *payload; struct open_attempt *oa; struct command *cmd; + struct channel_type *channel_type; assert(channel->open_attempt); oa = channel->open_attempt; @@ -3319,13 +3320,17 @@ static void handle_psbt_changed(struct subd *dualopend, &cid, &channel->req_confirmed_ins[REMOTE], &funding_serial, - &psbt)) { + &psbt, + &channel_type)) { channel_internal_error(channel, "Bad DUALOPEND_PSBT_CHANGED: %s", tal_hex(tmpctx, msg)); return; } + /* This is often the first time we hear about channel details */ + tal_free(channel->type); + channel->type = tal_steal(channel, channel_type); switch (oa->role) { case TX_INITIATOR: diff --git a/openingd/dualopend.c b/openingd/dualopend.c index 09ee719b750f..59781a4a55e4 100644 --- a/openingd/dualopend.c +++ b/openingd/dualopend.c @@ -1439,7 +1439,7 @@ fetch_psbt_changes(struct state *state, msg = towire_dualopend_psbt_changed(NULL, &state->channel_id, state->require_confirmed_inputs[REMOTE], tx_state->funding_serial, - psbt); + psbt, state->channel_type); wire_sync_write(REQ_FD, take(msg)); diff --git a/openingd/dualopend_wire.csv b/openingd/dualopend_wire.csv index 06996100fa05..5efbac7865a2 100644 --- a/openingd/dualopend_wire.csv +++ b/openingd/dualopend_wire.csv @@ -180,6 +180,7 @@ msgdata,dualopend_psbt_changed,channel_id,channel_id, msgdata,dualopend_psbt_changed,requires_confirmed_inputs,bool, msgdata,dualopend_psbt_changed,funding_serial,u64, msgdata,dualopend_psbt_changed,psbt,wally_psbt, +msgdata,dualopend_psbt_changed,channel_type,channel_type, # master->dualopend: we updated the psbt msgtype,dualopend_psbt_updated,7108