channeld: add a message to read if we only want to reestablish.

This supports reestablish on a closed channel: we tell channeld to
respond to the reestablish message appropriately, then close the
channel.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2021-06-15 14:37:10 +09:30
parent 6afb9f8fe7
commit 9929d6383a
14 changed files with 64 additions and 25 deletions

View File

@ -2511,7 +2511,8 @@ static bool capture_premature_msg(const u8 ***shit_lnd_says, const u8 *msg)
}
static void peer_reconnect(struct peer *peer,
const struct secret *last_remote_per_commit_secret)
const struct secret *last_remote_per_commit_secret,
u8 *reestablish_only)
{
struct channel_id channel_id;
/* Note: BOLT #2 uses these names! */
@ -2636,6 +2637,13 @@ static void peer_reconnect(struct peer *peer,
bool soft_error = peer->funding_locked[REMOTE]
|| peer->funding_locked[LOCAL];
/* If they sent reestablish, we analyze it for courtesy, but also
* in case *they* are ahead of us! */
if (reestablish_only) {
msg = reestablish_only;
goto got_reestablish;
}
/* Read until they say something interesting (don't forward
* gossip *to* them yet: we might try sending channel_update
* before we've reestablished channel). */
@ -2647,6 +2655,7 @@ static void peer_reconnect(struct peer *peer,
msg) ||
capture_premature_msg(&premature_msgs, msg));
got_reestablish:
#if EXPERIMENTAL_FEATURES
recv_tlvs = tlv_channel_reestablish_tlvs_new(tmpctx);
#endif
@ -2919,6 +2928,12 @@ static void peer_reconnect(struct peer *peer,
#endif /* EXPERIMENTAL_FEATURES */
/* Now stop, we've been polite long enough. */
if (reestablish_only)
peer_failed_err(peer->pps,
&peer->channel_id,
"Channel is already closed");
/* Corner case: we didn't send shutdown before because update_add_htlc
* pending, but now they're cleared by restart, and we're actually
* complete. In that case, their `shutdown` will trigger us. */
@ -3409,6 +3424,7 @@ static void init_channel(struct peer *peer)
secp256k1_ecdsa_signature *remote_ann_bitcoin_sig;
bool option_static_remotekey, option_anchor_outputs;
struct penalty_base *pbases;
u8 *reestablish_only;
#if !DEVELOPER
bool dev_fail_process_onionpacket; /* Ignored */
#endif
@ -3470,7 +3486,8 @@ static void init_channel(struct peer *peer)
&option_anchor_outputs,
&dev_fast_gossip,
&dev_fail_process_onionpacket,
&pbases)) {
&pbases,
&reestablish_only)) {
master_badmsg(WIRE_CHANNELD_INIT, msg);
}
@ -3562,7 +3579,10 @@ static void init_channel(struct peer *peer)
/* OK, now we can process peer messages. */
if (reconnected)
peer_reconnect(peer, &last_remote_per_commit_secret);
peer_reconnect(peer, &last_remote_per_commit_secret,
reestablish_only);
else
assert(!reestablish_only);
/* If we have a messages to send, send them immediately */
if (fwd_msg)

View File

@ -73,6 +73,8 @@ msgdata,channeld_init,dev_fast_gossip,bool,
msgdata,channeld_init,dev_fail_process_onionpacket,bool,
msgdata,channeld_init,num_penalty_bases,u32,
msgdata,channeld_init,pbases,penalty_base,num_penalty_bases
msgdata,channeld_init,reestablish_only_len,u16,
msgdata,channeld_init,reestablish_only,u8,reestablish_only_len
# master->channeld funding hit new depth(funding locked if >= lock depth)
msgtype,channeld_funding_depth,1002

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

View File

@ -98,7 +98,7 @@ bool channeld_wire_is_defined(u16 type)
/* WIRE: CHANNELD_INIT */
/* Begin! (passes gossipd-client fd) */
u8 *towire_channeld_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_features, const struct channel_id *channel_id, const struct bitcoin_txid *funding_txid, u16 funding_txout, struct amount_sat funding_satoshi, u32 minimum_depth, const struct channel_config *our_config, const struct channel_config *their_config, const struct fee_states *fee_states, u32 feerate_min, u32 feerate_max, u32 feerate_penalty, const struct bitcoin_signature *first_commit_sig, const struct per_peer_state *per_peer_state, const struct pubkey *remote_fundingkey, const struct basepoints *remote_basepoints, const struct pubkey *remote_per_commit, const struct pubkey *old_remote_per_commit, enum side opener, u32 fee_base, u32 fee_proportional, struct amount_msat local_msatoshi, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, const struct node_id *local_node_id, const struct node_id *remote_node_id, u32 commit_msec, u16 cltv_delta, bool last_was_revoke, const struct changed_htlc *last_sent_commit, u64 next_index_local, u64 next_index_remote, u64 revocations_received, u64 next_htlc_id, const struct existing_htlc **htlcs, bool local_funding_locked, bool remote_funding_locked, const struct short_channel_id *funding_short_id, bool reestablish, bool send_shutdown, bool remote_shutdown_received, const u8 *final_scriptpubkey, u8 flags, const u8 *init_peer_pkt, bool reached_announce_depth, const struct secret *last_remote_secret, const u8 *their_features, const u8 *upfront_shutdown_script, const secp256k1_ecdsa_signature *remote_ann_node_sig, const secp256k1_ecdsa_signature *remote_ann_bitcoin_sig, bool option_static_remotekey, bool option_anchor_outputs, bool dev_fast_gossip, bool dev_fail_process_onionpacket, const struct penalty_base *pbases)
u8 *towire_channeld_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_features, const struct channel_id *channel_id, const struct bitcoin_txid *funding_txid, u16 funding_txout, struct amount_sat funding_satoshi, u32 minimum_depth, const struct channel_config *our_config, const struct channel_config *their_config, const struct fee_states *fee_states, u32 feerate_min, u32 feerate_max, u32 feerate_penalty, const struct bitcoin_signature *first_commit_sig, const struct per_peer_state *per_peer_state, const struct pubkey *remote_fundingkey, const struct basepoints *remote_basepoints, const struct pubkey *remote_per_commit, const struct pubkey *old_remote_per_commit, enum side opener, u32 fee_base, u32 fee_proportional, struct amount_msat local_msatoshi, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, const struct node_id *local_node_id, const struct node_id *remote_node_id, u32 commit_msec, u16 cltv_delta, bool last_was_revoke, const struct changed_htlc *last_sent_commit, u64 next_index_local, u64 next_index_remote, u64 revocations_received, u64 next_htlc_id, const struct existing_htlc **htlcs, bool local_funding_locked, bool remote_funding_locked, const struct short_channel_id *funding_short_id, bool reestablish, bool send_shutdown, bool remote_shutdown_received, const u8 *final_scriptpubkey, u8 flags, const u8 *init_peer_pkt, bool reached_announce_depth, const struct secret *last_remote_secret, const u8 *their_features, const u8 *upfront_shutdown_script, const secp256k1_ecdsa_signature *remote_ann_node_sig, const secp256k1_ecdsa_signature *remote_ann_bitcoin_sig, bool option_static_remotekey, bool option_anchor_outputs, bool dev_fast_gossip, bool dev_fail_process_onionpacket, const struct penalty_base *pbases, const u8 *reestablish_only)
{
u16 num_last_sent_commit = tal_count(last_sent_commit);
u16 num_existing_htlcs = tal_count(htlcs);
@ -107,6 +107,7 @@ u8 *towire_channeld_init(const tal_t *ctx, const struct chainparams *chainparams
u16 flen = tal_count(their_features);
u16 upfront_shutdown_script_len = tal_count(upfront_shutdown_script);
u32 num_penalty_bases = tal_count(pbases);
u16 reestablish_only_len = tal_count(reestablish_only);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CHANNELD_INIT);
@ -186,10 +187,12 @@ u8 *towire_channeld_init(const tal_t *ctx, const struct chainparams *chainparams
towire_u32(&p, num_penalty_bases);
for (size_t i = 0; i < num_penalty_bases; i++)
towire_penalty_base(&p, pbases + i);
towire_u16(&p, reestablish_only_len);
towire_u8_array(&p, reestablish_only, reestablish_only_len);
return memcheck(p, tal_count(p));
}
bool fromwire_channeld_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_features, struct channel_id *channel_id, struct bitcoin_txid *funding_txid, u16 *funding_txout, struct amount_sat *funding_satoshi, u32 *minimum_depth, struct channel_config *our_config, struct channel_config *their_config, struct fee_states **fee_states, u32 *feerate_min, u32 *feerate_max, u32 *feerate_penalty, struct bitcoin_signature *first_commit_sig, struct per_peer_state **per_peer_state, struct pubkey *remote_fundingkey, struct basepoints *remote_basepoints, struct pubkey *remote_per_commit, struct pubkey *old_remote_per_commit, enum side *opener, u32 *fee_base, u32 *fee_proportional, struct amount_msat *local_msatoshi, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, struct node_id *local_node_id, struct node_id *remote_node_id, u32 *commit_msec, u16 *cltv_delta, bool *last_was_revoke, struct changed_htlc **last_sent_commit, u64 *next_index_local, u64 *next_index_remote, u64 *revocations_received, u64 *next_htlc_id, struct existing_htlc ***htlcs, bool *local_funding_locked, bool *remote_funding_locked, struct short_channel_id *funding_short_id, bool *reestablish, bool *send_shutdown, bool *remote_shutdown_received, u8 **final_scriptpubkey, u8 *flags, u8 **init_peer_pkt, bool *reached_announce_depth, struct secret *last_remote_secret, u8 **their_features, u8 **upfront_shutdown_script, secp256k1_ecdsa_signature **remote_ann_node_sig, secp256k1_ecdsa_signature **remote_ann_bitcoin_sig, bool *option_static_remotekey, bool *option_anchor_outputs, bool *dev_fast_gossip, bool *dev_fail_process_onionpacket, struct penalty_base **pbases)
bool fromwire_channeld_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_features, struct channel_id *channel_id, struct bitcoin_txid *funding_txid, u16 *funding_txout, struct amount_sat *funding_satoshi, u32 *minimum_depth, struct channel_config *our_config, struct channel_config *their_config, struct fee_states **fee_states, u32 *feerate_min, u32 *feerate_max, u32 *feerate_penalty, struct bitcoin_signature *first_commit_sig, struct per_peer_state **per_peer_state, struct pubkey *remote_fundingkey, struct basepoints *remote_basepoints, struct pubkey *remote_per_commit, struct pubkey *old_remote_per_commit, enum side *opener, u32 *fee_base, u32 *fee_proportional, struct amount_msat *local_msatoshi, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, struct node_id *local_node_id, struct node_id *remote_node_id, u32 *commit_msec, u16 *cltv_delta, bool *last_was_revoke, struct changed_htlc **last_sent_commit, u64 *next_index_local, u64 *next_index_remote, u64 *revocations_received, u64 *next_htlc_id, struct existing_htlc ***htlcs, bool *local_funding_locked, bool *remote_funding_locked, struct short_channel_id *funding_short_id, bool *reestablish, bool *send_shutdown, bool *remote_shutdown_received, u8 **final_scriptpubkey, u8 *flags, u8 **init_peer_pkt, bool *reached_announce_depth, struct secret *last_remote_secret, u8 **their_features, u8 **upfront_shutdown_script, secp256k1_ecdsa_signature **remote_ann_node_sig, secp256k1_ecdsa_signature **remote_ann_bitcoin_sig, bool *option_static_remotekey, bool *option_anchor_outputs, bool *dev_fast_gossip, bool *dev_fail_process_onionpacket, struct penalty_base **pbases, u8 **reestablish_only)
{
u16 num_last_sent_commit;
u16 num_existing_htlcs;
@ -198,6 +201,7 @@ bool fromwire_channeld_init(const tal_t *ctx, const void *p, const struct chainp
u16 flen;
u16 upfront_shutdown_script_len;
u32 num_penalty_bases;
u16 reestablish_only_len;
const u8 *cursor = p;
size_t plen = tal_count(p);
@ -294,6 +298,10 @@ bool fromwire_channeld_init(const tal_t *ctx, const void *p, const struct chainp
*pbases = num_penalty_bases ? tal_arr(ctx, struct penalty_base, num_penalty_bases) : NULL;
for (size_t i = 0; i < num_penalty_bases; i++)
fromwire_penalty_base(&cursor, &plen, *pbases + i);
reestablish_only_len = fromwire_u16(&cursor, &plen);
// 2nd case reestablish_only
*reestablish_only = reestablish_only_len ? tal_arr(ctx, u8, reestablish_only_len) : NULL;
fromwire_u8_array(&cursor, &plen, *reestablish_only, reestablish_only_len);
return cursor != NULL;
}
@ -1137,4 +1145,4 @@ bool fromwire_channeld_upgraded(const void *p, bool *option_static_remotekey)
*option_static_remotekey = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:2d7b763e89512ad8c5921b90c13f37ac83ab0016384c38e8c8e831683d668651
// SHA256STAMP:d67a5e23adc6362c93c60fcf3e4a46ccb1804dff1f10ec9a8d361ba9c548bb12

View File

@ -91,8 +91,8 @@ bool channeld_wire_is_defined(u16 type);
/* WIRE: CHANNELD_INIT */
/* Begin! (passes gossipd-client fd) */
u8 *towire_channeld_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_features, const struct channel_id *channel_id, const struct bitcoin_txid *funding_txid, u16 funding_txout, struct amount_sat funding_satoshi, u32 minimum_depth, const struct channel_config *our_config, const struct channel_config *their_config, const struct fee_states *fee_states, u32 feerate_min, u32 feerate_max, u32 feerate_penalty, const struct bitcoin_signature *first_commit_sig, const struct per_peer_state *per_peer_state, const struct pubkey *remote_fundingkey, const struct basepoints *remote_basepoints, const struct pubkey *remote_per_commit, const struct pubkey *old_remote_per_commit, enum side opener, u32 fee_base, u32 fee_proportional, struct amount_msat local_msatoshi, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, const struct node_id *local_node_id, const struct node_id *remote_node_id, u32 commit_msec, u16 cltv_delta, bool last_was_revoke, const struct changed_htlc *last_sent_commit, u64 next_index_local, u64 next_index_remote, u64 revocations_received, u64 next_htlc_id, const struct existing_htlc **htlcs, bool local_funding_locked, bool remote_funding_locked, const struct short_channel_id *funding_short_id, bool reestablish, bool send_shutdown, bool remote_shutdown_received, const u8 *final_scriptpubkey, u8 flags, const u8 *init_peer_pkt, bool reached_announce_depth, const struct secret *last_remote_secret, const u8 *their_features, const u8 *upfront_shutdown_script, const secp256k1_ecdsa_signature *remote_ann_node_sig, const secp256k1_ecdsa_signature *remote_ann_bitcoin_sig, bool option_static_remotekey, bool option_anchor_outputs, bool dev_fast_gossip, bool dev_fail_process_onionpacket, const struct penalty_base *pbases);
bool fromwire_channeld_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_features, struct channel_id *channel_id, struct bitcoin_txid *funding_txid, u16 *funding_txout, struct amount_sat *funding_satoshi, u32 *minimum_depth, struct channel_config *our_config, struct channel_config *their_config, struct fee_states **fee_states, u32 *feerate_min, u32 *feerate_max, u32 *feerate_penalty, struct bitcoin_signature *first_commit_sig, struct per_peer_state **per_peer_state, struct pubkey *remote_fundingkey, struct basepoints *remote_basepoints, struct pubkey *remote_per_commit, struct pubkey *old_remote_per_commit, enum side *opener, u32 *fee_base, u32 *fee_proportional, struct amount_msat *local_msatoshi, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, struct node_id *local_node_id, struct node_id *remote_node_id, u32 *commit_msec, u16 *cltv_delta, bool *last_was_revoke, struct changed_htlc **last_sent_commit, u64 *next_index_local, u64 *next_index_remote, u64 *revocations_received, u64 *next_htlc_id, struct existing_htlc ***htlcs, bool *local_funding_locked, bool *remote_funding_locked, struct short_channel_id *funding_short_id, bool *reestablish, bool *send_shutdown, bool *remote_shutdown_received, u8 **final_scriptpubkey, u8 *flags, u8 **init_peer_pkt, bool *reached_announce_depth, struct secret *last_remote_secret, u8 **their_features, u8 **upfront_shutdown_script, secp256k1_ecdsa_signature **remote_ann_node_sig, secp256k1_ecdsa_signature **remote_ann_bitcoin_sig, bool *option_static_remotekey, bool *option_anchor_outputs, bool *dev_fast_gossip, bool *dev_fail_process_onionpacket, struct penalty_base **pbases);
u8 *towire_channeld_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_features, const struct channel_id *channel_id, const struct bitcoin_txid *funding_txid, u16 funding_txout, struct amount_sat funding_satoshi, u32 minimum_depth, const struct channel_config *our_config, const struct channel_config *their_config, const struct fee_states *fee_states, u32 feerate_min, u32 feerate_max, u32 feerate_penalty, const struct bitcoin_signature *first_commit_sig, const struct per_peer_state *per_peer_state, const struct pubkey *remote_fundingkey, const struct basepoints *remote_basepoints, const struct pubkey *remote_per_commit, const struct pubkey *old_remote_per_commit, enum side opener, u32 fee_base, u32 fee_proportional, struct amount_msat local_msatoshi, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, const struct node_id *local_node_id, const struct node_id *remote_node_id, u32 commit_msec, u16 cltv_delta, bool last_was_revoke, const struct changed_htlc *last_sent_commit, u64 next_index_local, u64 next_index_remote, u64 revocations_received, u64 next_htlc_id, const struct existing_htlc **htlcs, bool local_funding_locked, bool remote_funding_locked, const struct short_channel_id *funding_short_id, bool reestablish, bool send_shutdown, bool remote_shutdown_received, const u8 *final_scriptpubkey, u8 flags, const u8 *init_peer_pkt, bool reached_announce_depth, const struct secret *last_remote_secret, const u8 *their_features, const u8 *upfront_shutdown_script, const secp256k1_ecdsa_signature *remote_ann_node_sig, const secp256k1_ecdsa_signature *remote_ann_bitcoin_sig, bool option_static_remotekey, bool option_anchor_outputs, bool dev_fast_gossip, bool dev_fail_process_onionpacket, const struct penalty_base *pbases, const u8 *reestablish_only);
bool fromwire_channeld_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_features, struct channel_id *channel_id, struct bitcoin_txid *funding_txid, u16 *funding_txout, struct amount_sat *funding_satoshi, u32 *minimum_depth, struct channel_config *our_config, struct channel_config *their_config, struct fee_states **fee_states, u32 *feerate_min, u32 *feerate_max, u32 *feerate_penalty, struct bitcoin_signature *first_commit_sig, struct per_peer_state **per_peer_state, struct pubkey *remote_fundingkey, struct basepoints *remote_basepoints, struct pubkey *remote_per_commit, struct pubkey *old_remote_per_commit, enum side *opener, u32 *fee_base, u32 *fee_proportional, struct amount_msat *local_msatoshi, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, struct node_id *local_node_id, struct node_id *remote_node_id, u32 *commit_msec, u16 *cltv_delta, bool *last_was_revoke, struct changed_htlc **last_sent_commit, u64 *next_index_local, u64 *next_index_remote, u64 *revocations_received, u64 *next_htlc_id, struct existing_htlc ***htlcs, bool *local_funding_locked, bool *remote_funding_locked, struct short_channel_id *funding_short_id, bool *reestablish, bool *send_shutdown, bool *remote_shutdown_received, u8 **final_scriptpubkey, u8 *flags, u8 **init_peer_pkt, bool *reached_announce_depth, struct secret *last_remote_secret, u8 **their_features, u8 **upfront_shutdown_script, secp256k1_ecdsa_signature **remote_ann_node_sig, secp256k1_ecdsa_signature **remote_ann_bitcoin_sig, bool *option_static_remotekey, bool *option_anchor_outputs, bool *dev_fast_gossip, bool *dev_fail_process_onionpacket, struct penalty_base **pbases, u8 **reestablish_only);
/* WIRE: CHANNELD_FUNDING_DEPTH */
/* master->channeld funding hit new depth(funding locked if >= lock depth) */
@ -232,4 +232,4 @@ bool fromwire_channeld_upgraded(const void *p, bool *option_static_remotekey);
#endif /* LIGHTNING_CHANNELD_CHANNELD_WIREGEN_H */
// SHA256STAMP:2d7b763e89512ad8c5921b90c13f37ac83ab0016384c38e8c8e831683d668651
// SHA256STAMP:d67a5e23adc6362c93c60fcf3e4a46ccb1804dff1f10ec9a8d361ba9c548bb12

View File

@ -481,7 +481,8 @@ static unsigned channel_msg(struct subd *sd, const u8 *msg, const int *fds)
void peer_start_channeld(struct channel *channel,
struct per_peer_state *pps,
const u8 *fwd_msg,
bool reconnected)
bool reconnected,
const u8 *reestablish_only)
{
u8 *initmsg;
int hsmfd;
@ -622,8 +623,11 @@ void peer_start_channeld(struct channel *channel,
channel->remote_funding_locked,
&scid,
reconnected,
/* Anything that indicates we are or have
* shut down */
channel->state == CHANNELD_SHUTTING_DOWN
|| channel->state == CLOSINGD_SIGEXCHANGE,
|| channel->state == CLOSINGD_SIGEXCHANGE
|| channel_closed(channel),
channel->shutdown_scriptpubkey[REMOTE] != NULL,
channel->shutdown_scriptpubkey[LOCAL],
channel->channel_flags,
@ -640,7 +644,8 @@ void peer_start_channeld(struct channel *channel,
channel->option_anchor_outputs,
IFDEV(ld->dev_fast_gossip, false),
IFDEV(dev_fail_process_onionpacket, false),
pbases);
pbases,
reestablish_only);
/* We don't expect a response: we are triggered by funding_depth_cb. */
subd_send_msg(channel->owner, take(initmsg));

View File

@ -13,7 +13,8 @@ struct peer;
void peer_start_channeld(struct channel *channel,
struct per_peer_state *pps,
const u8 *fwd_msg,
bool reconnected);
bool reconnected,
const u8 *reestablish_only);
/* Returns true if subd told, otherwise false. */
bool channel_tell_depth(struct lightningd *ld,

View File

@ -1549,7 +1549,7 @@ static void handle_channel_locked(struct subd *dualopend,
wallet_channel_clear_inflights(dualopend->ld->wallet, channel);
/* FIXME: LND sigs/update_fee msgs? */
peer_start_channeld(channel, pps, NULL, false);
peer_start_channeld(channel, pps, NULL, false, NULL);
return;
}

View File

@ -420,7 +420,7 @@ static void opening_funder_finished(struct subd *openingd, const u8 *resp,
wallet_penalty_base_add(ld->wallet, channel->dbid, pbase);
funding_success(channel);
peer_start_channeld(channel, pps, NULL, false);
peer_start_channeld(channel, pps, NULL, false, NULL);
cleanup:
subd_release_channel(openingd, fc->uc);
@ -535,7 +535,7 @@ static void opening_fundee_finished(struct subd *openingd,
wallet_penalty_base_add(ld->wallet, channel->dbid, pbase);
/* On to normal operation! */
peer_start_channeld(channel, pps, fwd_msg, false);
peer_start_channeld(channel, pps, fwd_msg, false, NULL);
subd_release_channel(openingd, uc);
uc->open_daemon = NULL;

View File

@ -1135,7 +1135,8 @@ static void peer_connected_hook_final(struct peer_connected_hook_payload *payloa
assert(!channel->owner);
channel->peer->addr = addr;
channel->peer->connected_incoming = payload->incoming;
peer_start_channeld(channel, payload->pps, NULL, true);
peer_start_channeld(channel, payload->pps, NULL, true,
NULL);
return;
}
abort();
@ -1594,6 +1595,7 @@ static const struct json_command listpeers_command = {
json_listpeers,
"Show current peers, if {level} is set, include logs for {id}"
};
/* Comment added to satisfice AUTODATA */
AUTODATA(json_command, &listpeers_command);
static struct command_result *
@ -2969,7 +2971,6 @@ static const struct json_command sendcustommsg_command = {
.verbose = "dev-sendcustommsg node_id hexcustommsg",
};
/* Comment added to satisfice AUTODATA */
AUTODATA(json_command, &sendcustommsg_command);
#endif /* DEVELOPER */

View File

@ -601,7 +601,8 @@ void peer_restart_dualopend(struct peer *peer UNNEEDED,
void peer_start_channeld(struct channel *channel UNNEEDED,
struct per_peer_state *pps UNNEEDED,
const u8 *fwd_msg UNNEEDED,
bool reconnected UNNEEDED)
bool reconnected UNNEEDED,
const u8 *reestablish_only UNNEEDED)
{ fprintf(stderr, "peer_start_channeld called!\n"); abort(); }
/* Generated stub for peer_start_dualopend */
void peer_start_dualopend(struct peer *peer UNNEEDED, struct per_peer_state *pps UNNEEDED)

View File

@ -1924,4 +1924,4 @@ struct db_query db_postgres_queries[] = {
#endif /* LIGHTNINGD_WALLET_GEN_DB_POSTGRES */
// SHA256STAMP:8402c09aa5503dcdb757a37cc9e4ef0b2a5ecddc773ace28eb380889152090ae
// SHA256STAMP:0cb27df4073d1a617d3d1712579e28c190208818458ea8b35c3c88276b428dc0

View File

@ -1924,4 +1924,4 @@ struct db_query db_sqlite3_queries[] = {
#endif /* LIGHTNINGD_WALLET_GEN_DB_SQLITE3 */
// SHA256STAMP:8402c09aa5503dcdb757a37cc9e4ef0b2a5ecddc773ace28eb380889152090ae
// SHA256STAMP:0cb27df4073d1a617d3d1712579e28c190208818458ea8b35c3c88276b428dc0

View File

@ -1262,11 +1262,11 @@ msgstr ""
msgid "not a valid SQL statement"
msgstr ""
#: wallet/test/run-wallet.c:1449
#: wallet/test/run-wallet.c:1450
msgid "SELECT COUNT(1) FROM channel_funding_inflights WHERE channel_id = ?;"
msgstr ""
#: wallet/test/run-wallet.c:1647
#: wallet/test/run-wallet.c:1648
msgid "INSERT INTO channels (id) VALUES (1);"
msgstr ""
# SHA256STAMP:5e19a14e405e7a16bdd2e8e3f5bd482f69a83f3cbc1febb8e60a5657bf143be3
# SHA256STAMP:af00e095200a0cdcd525759a786e1897d11a0effffd7d4b9d618bfa780acd229

View File

@ -647,7 +647,8 @@ void peer_restart_dualopend(struct peer *peer UNNEEDED,
void peer_start_channeld(struct channel *channel UNNEEDED,
struct per_peer_state *pps UNNEEDED,
const u8 *fwd_msg UNNEEDED,
bool reconnected UNNEEDED)
bool reconnected UNNEEDED,
const u8 *reestablish_only UNNEEDED)
{ fprintf(stderr, "peer_start_channeld called!\n"); abort(); }
/* Generated stub for peer_start_dualopend */
void peer_start_dualopend(struct peer *peer UNNEEDED, struct per_peer_state *pps UNNEEDED)