dualopend: remove channel_update message creation.

We don't have to generate these any more: lightningd does it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2024-01-31 13:46:18 +10:30
parent d81f243141
commit fc642155ff
3 changed files with 0 additions and 45 deletions

View File

@ -3629,9 +3629,6 @@ static unsigned int dual_opend_msg(struct subd *dualopend,
case WIRE_DUALOPEND_FAIL_FALLEN_BEHIND:
channel_fail_fallen_behind(dualopend, msg);
return 0;
/* FIXME: remove from dual_open_wire.csv */
case WIRE_DUALOPEND_LOCAL_PRIVATE_CHANNEL:
return 0;
case WIRE_DUALOPEND_VALIDATE_INPUTS:
handle_validate_inputs(dualopend, msg);
return 0;

View File

@ -3882,38 +3882,6 @@ static void send_channel_ready(struct state *state)
billboard_update(state);
}
/* FIXME: Maybe cache this? */
static struct amount_sat channel_size(struct state *state)
{
u32 funding_outnum;
const u8 *funding_wscript =
bitcoin_redeem_2of2(tmpctx,
&state->our_funding_pubkey,
&state->their_funding_pubkey);
if (!find_txout(state->tx_state->psbt,
scriptpubkey_p2wsh(tmpctx, funding_wscript),
&funding_outnum)) {
open_err_fatal(state, "Cannot fund txout");
}
return psbt_output_get_amount(state->tx_state->psbt, funding_outnum);
}
static void tell_gossipd_new_channel(struct state *state)
{
u8 *msg;
const u8 *annfeatures = get_agreed_channelfeatures(tmpctx,
state->our_features,
state->their_features);
/* Tell lightningd about local channel. */
msg = towire_dualopend_local_private_channel(NULL,
channel_size(state),
annfeatures);
wire_sync_write(REQ_FD, take(msg));
}
static u8 *handle_funding_depth(struct state *state, u8 *msg)
{
u32 depth;
@ -3928,9 +3896,6 @@ static u8 *handle_funding_depth(struct state *state, u8 *msg)
/* We check this before we arrive here, but for sanity */
assert(state->minimum_depth <= depth);
/* Tell gossipd the new channel exists before we tell peer. */
tell_gossipd_new_channel(state);
send_channel_ready(state);
if (state->channel_ready[REMOTE])
return towire_dualopend_channel_locked(state);
@ -4211,7 +4176,6 @@ static u8 *handle_master_in(struct state *state)
case WIRE_DUALOPEND_FAIL_FALLEN_BEHIND:
case WIRE_DUALOPEND_DRY_RUN:
case WIRE_DUALOPEND_VALIDATE_LEASE:
case WIRE_DUALOPEND_LOCAL_PRIVATE_CHANNEL:
case WIRE_DUALOPEND_VALIDATE_INPUTS:
break;
}

View File

@ -282,9 +282,3 @@ msgdata,dualopend_validate_lease,their_pubkey,pubkey,
msgtype,dualopend_validate_lease_reply,7127
msgdata,dualopend_validate_lease_reply,err_msg,?wirestring,
# Tell gossipd about this (as-yet) unannounced channel
msgtype,dualopend_local_private_channel,7015
msgdata,dualopend_local_private_channel,capacity,amount_sat,
msgdata,dualopend_local_private_channel,len,u16,
msgdata,dualopend_local_private_channel,features,u8,len

Can't render this file because it has a wrong number of fields in line 16.