mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
dualopend: fix channel_type if we don't negotiate the default.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
0b38b83aa3
commit
4cf4dcc584
@ -3312,6 +3312,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;
|
||||
@ -3321,13 +3322,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:
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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
|
||||
|
Can't render this file because it has a wrong number of fields in line 16.
|
Loading…
Reference in New Issue
Block a user