mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
openingd/dualopend: remove send_msg functionality.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -2813,8 +2813,7 @@ AUTODATA(json_command, &openchannel_abort_command);
|
|||||||
|
|
||||||
static void start_fresh_dualopend(struct peer *peer,
|
static void start_fresh_dualopend(struct peer *peer,
|
||||||
struct per_peer_state *pps,
|
struct per_peer_state *pps,
|
||||||
struct channel *channel,
|
struct channel *channel)
|
||||||
const u8 *send_msg)
|
|
||||||
{
|
{
|
||||||
int hsmfd;
|
int hsmfd;
|
||||||
u32 max_to_self_delay;
|
u32 max_to_self_delay;
|
||||||
@@ -2867,16 +2866,14 @@ static void start_fresh_dualopend(struct peer *peer,
|
|||||||
min_effective_htlc_capacity,
|
min_effective_htlc_capacity,
|
||||||
pps, &channel->local_basepoints,
|
pps, &channel->local_basepoints,
|
||||||
&channel->local_funding_pubkey,
|
&channel->local_funding_pubkey,
|
||||||
channel->minimum_depth,
|
channel->minimum_depth);
|
||||||
send_msg);
|
|
||||||
subd_send_msg(channel->owner, take(msg));
|
subd_send_msg(channel->owner, take(msg));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void peer_restart_dualopend(struct peer *peer,
|
void peer_restart_dualopend(struct peer *peer,
|
||||||
struct per_peer_state *pps,
|
struct per_peer_state *pps,
|
||||||
struct channel *channel,
|
struct channel *channel)
|
||||||
const u8 *send_msg)
|
|
||||||
{
|
{
|
||||||
u32 max_to_self_delay;
|
u32 max_to_self_delay;
|
||||||
struct amount_msat min_effective_htlc_capacity;
|
struct amount_msat min_effective_htlc_capacity;
|
||||||
@@ -2886,7 +2883,7 @@ void peer_restart_dualopend(struct peer *peer,
|
|||||||
u8 *msg;
|
u8 *msg;
|
||||||
|
|
||||||
if (channel_unsaved(channel)) {
|
if (channel_unsaved(channel)) {
|
||||||
start_fresh_dualopend(peer, pps, channel, send_msg);
|
start_fresh_dualopend(peer, pps, channel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
hsmfd = hsm_get_client_fd(peer->ld, &peer->id, channel->dbid,
|
hsmfd = hsm_get_client_fd(peer->ld, &peer->id, channel->dbid,
|
||||||
@@ -2960,16 +2957,13 @@ void peer_restart_dualopend(struct peer *peer,
|
|||||||
channel->remote_upfront_shutdown_script,
|
channel->remote_upfront_shutdown_script,
|
||||||
inflight->remote_tx_sigs,
|
inflight->remote_tx_sigs,
|
||||||
channel->fee_states,
|
channel->fee_states,
|
||||||
channel->channel_flags,
|
channel->channel_flags);
|
||||||
send_msg);
|
|
||||||
|
|
||||||
|
|
||||||
subd_send_msg(channel->owner, take(msg));
|
subd_send_msg(channel->owner, take(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
void peer_start_dualopend(struct peer *peer,
|
void peer_start_dualopend(struct peer *peer, struct per_peer_state *pps)
|
||||||
struct per_peer_state *pps,
|
|
||||||
const u8 *send_msg)
|
|
||||||
{
|
{
|
||||||
struct channel *channel;
|
struct channel *channel;
|
||||||
|
|
||||||
@@ -2979,5 +2973,5 @@ void peer_start_dualopend(struct peer *peer,
|
|||||||
peer->ld->config.fee_base,
|
peer->ld->config.fee_base,
|
||||||
peer->ld->config.fee_per_satoshi);
|
peer->ld->config.fee_per_satoshi);
|
||||||
|
|
||||||
start_fresh_dualopend(peer, pps, channel, send_msg);
|
start_fresh_dualopend(peer, pps, channel);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,14 +6,11 @@
|
|||||||
|
|
||||||
struct per_peer_state;
|
struct per_peer_state;
|
||||||
|
|
||||||
void peer_start_dualopend(struct peer *peer,
|
void peer_start_dualopend(struct peer *peer, struct per_peer_state *pps);
|
||||||
struct per_peer_state *pps,
|
|
||||||
const u8 *send_msg);
|
|
||||||
|
|
||||||
void peer_restart_dualopend(struct peer *peer,
|
void peer_restart_dualopend(struct peer *peer,
|
||||||
struct per_peer_state *pps,
|
struct per_peer_state *pps,
|
||||||
struct channel *channel,
|
struct channel *channel);
|
||||||
const u8 *send_msg);
|
|
||||||
|
|
||||||
void dualopen_tell_depth(struct subd *dualopend,
|
void dualopen_tell_depth(struct subd *dualopend,
|
||||||
struct channel *channel,
|
struct channel *channel,
|
||||||
|
|||||||
@@ -876,9 +876,7 @@ static unsigned int openingd_msg(struct subd *openingd,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void peer_start_openingd(struct peer *peer,
|
void peer_start_openingd(struct peer *peer, struct per_peer_state *pps)
|
||||||
struct per_peer_state *pps,
|
|
||||||
const u8 *send_msg)
|
|
||||||
{
|
{
|
||||||
int hsmfd;
|
int hsmfd;
|
||||||
u32 max_to_self_delay;
|
u32 max_to_self_delay;
|
||||||
@@ -944,7 +942,6 @@ void peer_start_openingd(struct peer *peer,
|
|||||||
feature_negotiated(peer->ld->our_features,
|
feature_negotiated(peer->ld->our_features,
|
||||||
peer->their_features,
|
peer->their_features,
|
||||||
OPT_ANCHOR_OUTPUTS),
|
OPT_ANCHOR_OUTPUTS),
|
||||||
send_msg,
|
|
||||||
IFDEV(peer->ld->dev_force_tmp_channel_id, NULL),
|
IFDEV(peer->ld->dev_force_tmp_channel_id, NULL),
|
||||||
IFDEV(peer->ld->dev_fast_gossip, false));
|
IFDEV(peer->ld->dev_fast_gossip, false));
|
||||||
subd_send_msg(uc->open_daemon, take(msg));
|
subd_send_msg(uc->open_daemon, take(msg));
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ void json_add_uncommitted_channel(struct json_stream *response,
|
|||||||
const struct uncommitted_channel *uc);
|
const struct uncommitted_channel *uc);
|
||||||
|
|
||||||
void peer_start_openingd(struct peer *peer,
|
void peer_start_openingd(struct peer *peer,
|
||||||
struct per_peer_state *pps,
|
struct per_peer_state *pps);
|
||||||
const u8 *msg);
|
|
||||||
|
|
||||||
struct subd *peer_get_owning_subd(struct peer *peer);
|
struct subd *peer_get_owning_subd(struct peer *peer);
|
||||||
|
|
||||||
|
|||||||
@@ -1113,7 +1113,7 @@ static void peer_connected_hook_final(struct peer_connected_hook_payload *payloa
|
|||||||
assert(!channel->owner);
|
assert(!channel->owner);
|
||||||
channel->peer->addr = addr;
|
channel->peer->addr = addr;
|
||||||
channel->peer->connected_incoming = payload->incoming;
|
channel->peer->connected_incoming = payload->incoming;
|
||||||
peer_restart_dualopend(peer, payload->pps, channel, NULL);
|
peer_restart_dualopend(peer, payload->pps, channel);
|
||||||
return;
|
return;
|
||||||
case CHANNELD_AWAITING_LOCKIN:
|
case CHANNELD_AWAITING_LOCKIN:
|
||||||
case CHANNELD_NORMAL:
|
case CHANNELD_NORMAL:
|
||||||
@@ -1146,11 +1146,11 @@ static void peer_connected_hook_final(struct peer_connected_hook_payload *payloa
|
|||||||
|| channel->state == AWAITING_UNILATERAL);
|
|| channel->state == AWAITING_UNILATERAL);
|
||||||
channel->peer->addr = addr;
|
channel->peer->addr = addr;
|
||||||
channel->peer->connected_incoming = payload->incoming;
|
channel->peer->connected_incoming = payload->incoming;
|
||||||
peer_restart_dualopend(peer, payload->pps, channel, NULL);
|
peer_restart_dualopend(peer, payload->pps, channel);
|
||||||
} else
|
} else
|
||||||
peer_start_dualopend(peer, payload->pps, NULL);
|
peer_start_dualopend(peer, payload->pps);
|
||||||
} else
|
} else
|
||||||
peer_start_openingd(peer, payload->pps, NULL);
|
peer_start_openingd(peer, payload->pps);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
send_error:
|
send_error:
|
||||||
|
|||||||
@@ -569,8 +569,7 @@ struct channel *peer_normal_channel(struct peer *peer UNNEEDED)
|
|||||||
/* Generated stub for peer_restart_dualopend */
|
/* Generated stub for peer_restart_dualopend */
|
||||||
void peer_restart_dualopend(struct peer *peer UNNEEDED,
|
void peer_restart_dualopend(struct peer *peer UNNEEDED,
|
||||||
struct per_peer_state *pps UNNEEDED,
|
struct per_peer_state *pps UNNEEDED,
|
||||||
struct channel *channel UNNEEDED,
|
struct channel *channel UNNEEDED)
|
||||||
const u8 *send_msg UNNEEDED)
|
|
||||||
{ fprintf(stderr, "peer_restart_dualopend called!\n"); abort(); }
|
{ fprintf(stderr, "peer_restart_dualopend called!\n"); abort(); }
|
||||||
/* Generated stub for peer_start_channeld */
|
/* Generated stub for peer_start_channeld */
|
||||||
void peer_start_channeld(struct channel *channel UNNEEDED,
|
void peer_start_channeld(struct channel *channel UNNEEDED,
|
||||||
@@ -585,14 +584,11 @@ void peer_start_closingd(struct channel *channel UNNEEDED,
|
|||||||
const u8 *channel_reestablish UNNEEDED)
|
const u8 *channel_reestablish UNNEEDED)
|
||||||
{ fprintf(stderr, "peer_start_closingd called!\n"); abort(); }
|
{ fprintf(stderr, "peer_start_closingd called!\n"); abort(); }
|
||||||
/* Generated stub for peer_start_dualopend */
|
/* Generated stub for peer_start_dualopend */
|
||||||
void peer_start_dualopend(struct peer *peer UNNEEDED,
|
void peer_start_dualopend(struct peer *peer UNNEEDED, struct per_peer_state *pps UNNEEDED)
|
||||||
struct per_peer_state *pps UNNEEDED,
|
|
||||||
const u8 *send_msg UNNEEDED)
|
|
||||||
{ fprintf(stderr, "peer_start_dualopend called!\n"); abort(); }
|
{ fprintf(stderr, "peer_start_dualopend called!\n"); abort(); }
|
||||||
/* Generated stub for peer_start_openingd */
|
/* Generated stub for peer_start_openingd */
|
||||||
void peer_start_openingd(struct peer *peer UNNEEDED,
|
void peer_start_openingd(struct peer *peer UNNEEDED,
|
||||||
struct per_peer_state *pps UNNEEDED,
|
struct per_peer_state *pps UNNEEDED)
|
||||||
const u8 *msg UNNEEDED)
|
|
||||||
{ fprintf(stderr, "peer_start_openingd called!\n"); abort(); }
|
{ fprintf(stderr, "peer_start_openingd called!\n"); abort(); }
|
||||||
/* Generated stub for peer_unsaved_channel */
|
/* Generated stub for peer_unsaved_channel */
|
||||||
struct channel *peer_unsaved_channel(struct peer *peer UNNEEDED)
|
struct channel *peer_unsaved_channel(struct peer *peer UNNEEDED)
|
||||||
|
|||||||
@@ -3251,24 +3251,6 @@ static void do_reconnect_dance(struct state *state)
|
|||||||
peer_billboard(true, "Reconnected, and reestablished.");
|
peer_billboard(true, "Reconnected, and reestablished.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*~ Is this message of type `error` with the special zero-id
|
|
||||||
* "fail-everything"? If lightningd asked us to send such a thing, we're
|
|
||||||
* done. */
|
|
||||||
static void fail_if_all_error(const u8 *inner)
|
|
||||||
{
|
|
||||||
struct channel_id channel_id;
|
|
||||||
u8 *data;
|
|
||||||
|
|
||||||
if (!fromwire_error(tmpctx, inner, &channel_id, &data)
|
|
||||||
|| !channel_id_is_all(&channel_id)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
status_info("Master said send err: %s",
|
|
||||||
sanitize_error(tmpctx, inner, NULL));
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Standard lightningd-fd-is-ready-to-read demux code. Again, we could hang
|
/* Standard lightningd-fd-is-ready-to-read demux code. Again, we could hang
|
||||||
* here, but if we can't trust our parent, who can we trust? */
|
* here, but if we can't trust our parent, who can we trust? */
|
||||||
static u8 *handle_master_in(struct state *state)
|
static u8 *handle_master_in(struct state *state)
|
||||||
@@ -3456,7 +3438,7 @@ int main(int argc, char *argv[])
|
|||||||
struct secret *none;
|
struct secret *none;
|
||||||
struct fee_states *fee_states;
|
struct fee_states *fee_states;
|
||||||
enum side opener;
|
enum side opener;
|
||||||
u8 *msg, *inner;
|
u8 *msg;
|
||||||
struct amount_sat total_funding;
|
struct amount_sat total_funding;
|
||||||
struct amount_msat our_msat;
|
struct amount_msat our_msat;
|
||||||
|
|
||||||
@@ -3481,8 +3463,7 @@ int main(int argc, char *argv[])
|
|||||||
&state->pps,
|
&state->pps,
|
||||||
&state->our_points,
|
&state->our_points,
|
||||||
&state->our_funding_pubkey,
|
&state->our_funding_pubkey,
|
||||||
&state->minimum_depth,
|
&state->minimum_depth)) {
|
||||||
&inner)) {
|
|
||||||
/*~ Initially we're not associated with a channel, but
|
/*~ Initially we're not associated with a channel, but
|
||||||
* handle_peer_gossip_or_error compares this. */
|
* handle_peer_gossip_or_error compares this. */
|
||||||
memset(&state->channel_id, 0, sizeof(state->channel_id));
|
memset(&state->channel_id, 0, sizeof(state->channel_id));
|
||||||
@@ -3534,8 +3515,7 @@ int main(int argc, char *argv[])
|
|||||||
&state->upfront_shutdown_script[REMOTE],
|
&state->upfront_shutdown_script[REMOTE],
|
||||||
&state->tx_state->remote_funding_sigs_rcvd,
|
&state->tx_state->remote_funding_sigs_rcvd,
|
||||||
&fee_states,
|
&fee_states,
|
||||||
&state->channel_flags,
|
&state->channel_flags)) {
|
||||||
&inner)) {
|
|
||||||
|
|
||||||
/*~ We only reconnect on channels that the
|
/*~ We only reconnect on channels that the
|
||||||
* saved the the database (exchanged commitment sigs) */
|
* saved the the database (exchanged commitment sigs) */
|
||||||
@@ -3571,14 +3551,6 @@ int main(int argc, char *argv[])
|
|||||||
/* 3 == peer, 4 == gossipd, 5 = gossip_store, 6 = hsmd */
|
/* 3 == peer, 4 == gossipd, 5 = gossip_store, 6 = hsmd */
|
||||||
per_peer_state_set_fds(state->pps, 3, 4, 5);
|
per_peer_state_set_fds(state->pps, 3, 4, 5);
|
||||||
|
|
||||||
/*~ If lightningd wanted us to send a msg, do so before we waste time
|
|
||||||
* doing work. If it's a global error, we'll close immediately. */
|
|
||||||
if (inner != NULL) {
|
|
||||||
sync_crypto_write(state->pps, inner);
|
|
||||||
fail_if_all_error(inner);
|
|
||||||
tal_free(inner);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*~ We need an initial per-commitment point whether we're funding or
|
/*~ We need an initial per-commitment point whether we're funding or
|
||||||
* they are, and lightningd has reserved a unique dbid for us already,
|
* they are, and lightningd has reserved a unique dbid for us already,
|
||||||
* so we might as well get the hsm daemon to generate it now. */
|
* so we might as well get the hsm daemon to generate it now. */
|
||||||
|
|||||||
@@ -26,9 +26,6 @@ msgdata,dualopend_init,our_basepoints,basepoints,
|
|||||||
msgdata,dualopend_init,our_funding_pubkey,pubkey,
|
msgdata,dualopend_init,our_funding_pubkey,pubkey,
|
||||||
# Constraints in case the other end tries to open a channel.
|
# Constraints in case the other end tries to open a channel.
|
||||||
msgdata,dualopend_init,minimum_depth,u32,
|
msgdata,dualopend_init,minimum_depth,u32,
|
||||||
# Optional msg to send.
|
|
||||||
msgdata,dualopend_init,len,u16,
|
|
||||||
msgdata,dualopend_init,msg,u8,len
|
|
||||||
|
|
||||||
# master-dualopend: peer has reconnected
|
# master-dualopend: peer has reconnected
|
||||||
msgtype,dualopend_reinit,7001
|
msgtype,dualopend_reinit,7001
|
||||||
@@ -67,9 +64,6 @@ msgdata,dualopend_reinit,remote_shutdown_scriptpubkey,u8,remote_shutdown_len
|
|||||||
msgdata,dualopend_reinit,remote_funding_sigs_received,bool,
|
msgdata,dualopend_reinit,remote_funding_sigs_received,bool,
|
||||||
msgdata,dualopend_reinit,fee_states,fee_states,
|
msgdata,dualopend_reinit,fee_states,fee_states,
|
||||||
msgdata,dualopend_reinit,channel_flags,u8,
|
msgdata,dualopend_reinit,channel_flags,u8,
|
||||||
# Optional msg to send.
|
|
||||||
msgdata,dualopend_reinit,len,u16,
|
|
||||||
msgdata,dualopend_reinit,msg,u8,len
|
|
||||||
|
|
||||||
# dualopend->master: they offered channel, should we continue?
|
# dualopend->master: they offered channel, should we continue?
|
||||||
msgtype,dualopend_got_offer,7005
|
msgtype,dualopend_got_offer,7005
|
||||||
|
|||||||
|
Can't render this file because it has a wrong number of fields in line 13.
|
30
openingd/dualopend_wiregen.c
generated
30
openingd/dualopend_wiregen.c
generated
@@ -91,10 +91,9 @@ bool dualopend_wire_is_defined(u16 type)
|
|||||||
|
|
||||||
|
|
||||||
/* WIRE: DUALOPEND_INIT */
|
/* WIRE: DUALOPEND_INIT */
|
||||||
u8 *towire_dualopend_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_feature_set, const u8 *their_init_features, const struct channel_config *our_config, u32 max_to_self_delay, struct amount_msat min_effective_htlc_capacity_msat, const struct per_peer_state *pps, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, u32 minimum_depth, const u8 *msg)
|
u8 *towire_dualopend_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_feature_set, const u8 *their_init_features, const struct channel_config *our_config, u32 max_to_self_delay, struct amount_msat min_effective_htlc_capacity_msat, const struct per_peer_state *pps, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, u32 minimum_depth)
|
||||||
{
|
{
|
||||||
u16 their_init_features_len = tal_count(their_init_features);
|
u16 their_init_features_len = tal_count(their_init_features);
|
||||||
u16 len = tal_count(msg);
|
|
||||||
u8 *p = tal_arr(ctx, u8, 0);
|
u8 *p = tal_arr(ctx, u8, 0);
|
||||||
|
|
||||||
towire_u16(&p, WIRE_DUALOPEND_INIT);
|
towire_u16(&p, WIRE_DUALOPEND_INIT);
|
||||||
@@ -113,16 +112,12 @@ u8 *towire_dualopend_init(const tal_t *ctx, const struct chainparams *chainparam
|
|||||||
towire_pubkey(&p, our_funding_pubkey);
|
towire_pubkey(&p, our_funding_pubkey);
|
||||||
/* Constraints in case the other end tries to open a channel. */
|
/* Constraints in case the other end tries to open a channel. */
|
||||||
towire_u32(&p, minimum_depth);
|
towire_u32(&p, minimum_depth);
|
||||||
/* Optional msg to send. */
|
|
||||||
towire_u16(&p, len);
|
|
||||||
towire_u8_array(&p, msg, len);
|
|
||||||
|
|
||||||
return memcheck(p, tal_count(p));
|
return memcheck(p, tal_count(p));
|
||||||
}
|
}
|
||||||
bool fromwire_dualopend_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_feature_set, u8 **their_init_features, struct channel_config *our_config, u32 *max_to_self_delay, struct amount_msat *min_effective_htlc_capacity_msat, struct per_peer_state **pps, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, u32 *minimum_depth, u8 **msg)
|
bool fromwire_dualopend_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_feature_set, u8 **their_init_features, struct channel_config *our_config, u32 *max_to_self_delay, struct amount_msat *min_effective_htlc_capacity_msat, struct per_peer_state **pps, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, u32 *minimum_depth)
|
||||||
{
|
{
|
||||||
u16 their_init_features_len;
|
u16 their_init_features_len;
|
||||||
u16 len;
|
|
||||||
|
|
||||||
const u8 *cursor = p;
|
const u8 *cursor = p;
|
||||||
size_t plen = tal_count(p);
|
size_t plen = tal_count(p);
|
||||||
@@ -146,22 +141,16 @@ bool fromwire_dualopend_init(const tal_t *ctx, const void *p, const struct chain
|
|||||||
fromwire_pubkey(&cursor, &plen, our_funding_pubkey);
|
fromwire_pubkey(&cursor, &plen, our_funding_pubkey);
|
||||||
/* Constraints in case the other end tries to open a channel. */
|
/* Constraints in case the other end tries to open a channel. */
|
||||||
*minimum_depth = fromwire_u32(&cursor, &plen);
|
*minimum_depth = fromwire_u32(&cursor, &plen);
|
||||||
/* Optional msg to send. */
|
|
||||||
len = fromwire_u16(&cursor, &plen);
|
|
||||||
// 2nd case msg
|
|
||||||
*msg = len ? tal_arr(ctx, u8, len) : NULL;
|
|
||||||
fromwire_u8_array(&cursor, &plen, *msg, len);
|
|
||||||
return cursor != NULL;
|
return cursor != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* WIRE: DUALOPEND_REINIT */
|
/* WIRE: DUALOPEND_REINIT */
|
||||||
/* master-dualopend: peer has reconnected */
|
/* master-dualopend: peer has reconnected */
|
||||||
u8 *towire_dualopend_reinit(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_feature_set, const u8 *their_init_features, const struct channel_config *our_config, const struct channel_config *their_config, const struct channel_id *channel_id, u32 max_to_self_delay, struct amount_msat min_effective_htlc_capacity_msat, const struct per_peer_state *pps, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, const struct pubkey *their_funding_pubkey, u32 minimum_depth, const struct bitcoin_txid *funding_txid, u16 funding_txout, u32 orignal_feerate_per_kw_funding, u32 most_recent_feerate_per_kw_funding, struct amount_sat funding_satoshi, struct amount_msat our_funding, const struct basepoints *their_basepoints, const struct pubkey *remote_per_commit, const struct wally_psbt *funding_psbt, enum side opener, bool local_funding_locked, bool remote_funding_locked, bool send_shutdown, bool remote_shutdown_received, const u8 *local_shutdown_scriptpubkey, const u8 *remote_shutdown_scriptpubkey, bool remote_funding_sigs_received, const struct fee_states *fee_states, u8 channel_flags, const u8 *msg)
|
u8 *towire_dualopend_reinit(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_feature_set, const u8 *their_init_features, const struct channel_config *our_config, const struct channel_config *their_config, const struct channel_id *channel_id, u32 max_to_self_delay, struct amount_msat min_effective_htlc_capacity_msat, const struct per_peer_state *pps, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, const struct pubkey *their_funding_pubkey, u32 minimum_depth, const struct bitcoin_txid *funding_txid, u16 funding_txout, u32 orignal_feerate_per_kw_funding, u32 most_recent_feerate_per_kw_funding, struct amount_sat funding_satoshi, struct amount_msat our_funding, const struct basepoints *their_basepoints, const struct pubkey *remote_per_commit, const struct wally_psbt *funding_psbt, enum side opener, bool local_funding_locked, bool remote_funding_locked, bool send_shutdown, bool remote_shutdown_received, const u8 *local_shutdown_scriptpubkey, const u8 *remote_shutdown_scriptpubkey, bool remote_funding_sigs_received, const struct fee_states *fee_states, u8 channel_flags)
|
||||||
{
|
{
|
||||||
u16 their_init_features_len = tal_count(their_init_features);
|
u16 their_init_features_len = tal_count(their_init_features);
|
||||||
u16 local_shutdown_len = tal_count(local_shutdown_scriptpubkey);
|
u16 local_shutdown_len = tal_count(local_shutdown_scriptpubkey);
|
||||||
u16 remote_shutdown_len = tal_count(remote_shutdown_scriptpubkey);
|
u16 remote_shutdown_len = tal_count(remote_shutdown_scriptpubkey);
|
||||||
u16 len = tal_count(msg);
|
|
||||||
u8 *p = tal_arr(ctx, u8, 0);
|
u8 *p = tal_arr(ctx, u8, 0);
|
||||||
|
|
||||||
towire_u16(&p, WIRE_DUALOPEND_REINIT);
|
towire_u16(&p, WIRE_DUALOPEND_REINIT);
|
||||||
@@ -200,18 +189,14 @@ u8 *towire_dualopend_reinit(const tal_t *ctx, const struct chainparams *chainpar
|
|||||||
towire_bool(&p, remote_funding_sigs_received);
|
towire_bool(&p, remote_funding_sigs_received);
|
||||||
towire_fee_states(&p, fee_states);
|
towire_fee_states(&p, fee_states);
|
||||||
towire_u8(&p, channel_flags);
|
towire_u8(&p, channel_flags);
|
||||||
/* Optional msg to send. */
|
|
||||||
towire_u16(&p, len);
|
|
||||||
towire_u8_array(&p, msg, len);
|
|
||||||
|
|
||||||
return memcheck(p, tal_count(p));
|
return memcheck(p, tal_count(p));
|
||||||
}
|
}
|
||||||
bool fromwire_dualopend_reinit(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_feature_set, u8 **their_init_features, struct channel_config *our_config, struct channel_config *their_config, struct channel_id *channel_id, u32 *max_to_self_delay, struct amount_msat *min_effective_htlc_capacity_msat, struct per_peer_state **pps, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, struct pubkey *their_funding_pubkey, u32 *minimum_depth, struct bitcoin_txid *funding_txid, u16 *funding_txout, u32 *orignal_feerate_per_kw_funding, u32 *most_recent_feerate_per_kw_funding, struct amount_sat *funding_satoshi, struct amount_msat *our_funding, struct basepoints *their_basepoints, struct pubkey *remote_per_commit, struct wally_psbt **funding_psbt, enum side *opener, bool *local_funding_locked, bool *remote_funding_locked, bool *send_shutdown, bool *remote_shutdown_received, u8 **local_shutdown_scriptpubkey, u8 **remote_shutdown_scriptpubkey, bool *remote_funding_sigs_received, struct fee_states **fee_states, u8 *channel_flags, u8 **msg)
|
bool fromwire_dualopend_reinit(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_feature_set, u8 **their_init_features, struct channel_config *our_config, struct channel_config *their_config, struct channel_id *channel_id, u32 *max_to_self_delay, struct amount_msat *min_effective_htlc_capacity_msat, struct per_peer_state **pps, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, struct pubkey *their_funding_pubkey, u32 *minimum_depth, struct bitcoin_txid *funding_txid, u16 *funding_txout, u32 *orignal_feerate_per_kw_funding, u32 *most_recent_feerate_per_kw_funding, struct amount_sat *funding_satoshi, struct amount_msat *our_funding, struct basepoints *their_basepoints, struct pubkey *remote_per_commit, struct wally_psbt **funding_psbt, enum side *opener, bool *local_funding_locked, bool *remote_funding_locked, bool *send_shutdown, bool *remote_shutdown_received, u8 **local_shutdown_scriptpubkey, u8 **remote_shutdown_scriptpubkey, bool *remote_funding_sigs_received, struct fee_states **fee_states, u8 *channel_flags)
|
||||||
{
|
{
|
||||||
u16 their_init_features_len;
|
u16 their_init_features_len;
|
||||||
u16 local_shutdown_len;
|
u16 local_shutdown_len;
|
||||||
u16 remote_shutdown_len;
|
u16 remote_shutdown_len;
|
||||||
u16 len;
|
|
||||||
|
|
||||||
const u8 *cursor = p;
|
const u8 *cursor = p;
|
||||||
size_t plen = tal_count(p);
|
size_t plen = tal_count(p);
|
||||||
@@ -259,11 +244,6 @@ bool fromwire_dualopend_reinit(const tal_t *ctx, const void *p, const struct cha
|
|||||||
*remote_funding_sigs_received = fromwire_bool(&cursor, &plen);
|
*remote_funding_sigs_received = fromwire_bool(&cursor, &plen);
|
||||||
*fee_states = fromwire_fee_states(ctx, &cursor, &plen);
|
*fee_states = fromwire_fee_states(ctx, &cursor, &plen);
|
||||||
*channel_flags = fromwire_u8(&cursor, &plen);
|
*channel_flags = fromwire_u8(&cursor, &plen);
|
||||||
/* Optional msg to send. */
|
|
||||||
len = fromwire_u16(&cursor, &plen);
|
|
||||||
// 2nd case msg
|
|
||||||
*msg = len ? tal_arr(ctx, u8, len) : NULL;
|
|
||||||
fromwire_u8_array(&cursor, &plen, *msg, len);
|
|
||||||
return cursor != NULL;
|
return cursor != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -932,4 +912,4 @@ bool fromwire_dualopend_dev_memleak_reply(const void *p, bool *leak)
|
|||||||
*leak = fromwire_bool(&cursor, &plen);
|
*leak = fromwire_bool(&cursor, &plen);
|
||||||
return cursor != NULL;
|
return cursor != NULL;
|
||||||
}
|
}
|
||||||
// SHA256STAMP:b93c5d3aad8cc2f256ed1205341ff68ea34d5bfc4a0d05071a8fe28177186bc5
|
// SHA256STAMP:0cbaf66a07e1ffa2e01a85398b6937391af66eb78302e22fe7b9a3076963db4e
|
||||||
|
|||||||
10
openingd/dualopend_wiregen.h
generated
10
openingd/dualopend_wiregen.h
generated
@@ -86,13 +86,13 @@ bool dualopend_wire_is_defined(u16 type);
|
|||||||
|
|
||||||
|
|
||||||
/* WIRE: DUALOPEND_INIT */
|
/* WIRE: DUALOPEND_INIT */
|
||||||
u8 *towire_dualopend_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_feature_set, const u8 *their_init_features, const struct channel_config *our_config, u32 max_to_self_delay, struct amount_msat min_effective_htlc_capacity_msat, const struct per_peer_state *pps, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, u32 minimum_depth, const u8 *msg);
|
u8 *towire_dualopend_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_feature_set, const u8 *their_init_features, const struct channel_config *our_config, u32 max_to_self_delay, struct amount_msat min_effective_htlc_capacity_msat, const struct per_peer_state *pps, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, u32 minimum_depth);
|
||||||
bool fromwire_dualopend_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_feature_set, u8 **their_init_features, struct channel_config *our_config, u32 *max_to_self_delay, struct amount_msat *min_effective_htlc_capacity_msat, struct per_peer_state **pps, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, u32 *minimum_depth, u8 **msg);
|
bool fromwire_dualopend_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_feature_set, u8 **their_init_features, struct channel_config *our_config, u32 *max_to_self_delay, struct amount_msat *min_effective_htlc_capacity_msat, struct per_peer_state **pps, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, u32 *minimum_depth);
|
||||||
|
|
||||||
/* WIRE: DUALOPEND_REINIT */
|
/* WIRE: DUALOPEND_REINIT */
|
||||||
/* master-dualopend: peer has reconnected */
|
/* master-dualopend: peer has reconnected */
|
||||||
u8 *towire_dualopend_reinit(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_feature_set, const u8 *their_init_features, const struct channel_config *our_config, const struct channel_config *their_config, const struct channel_id *channel_id, u32 max_to_self_delay, struct amount_msat min_effective_htlc_capacity_msat, const struct per_peer_state *pps, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, const struct pubkey *their_funding_pubkey, u32 minimum_depth, const struct bitcoin_txid *funding_txid, u16 funding_txout, u32 orignal_feerate_per_kw_funding, u32 most_recent_feerate_per_kw_funding, struct amount_sat funding_satoshi, struct amount_msat our_funding, const struct basepoints *their_basepoints, const struct pubkey *remote_per_commit, const struct wally_psbt *funding_psbt, enum side opener, bool local_funding_locked, bool remote_funding_locked, bool send_shutdown, bool remote_shutdown_received, const u8 *local_shutdown_scriptpubkey, const u8 *remote_shutdown_scriptpubkey, bool remote_funding_sigs_received, const struct fee_states *fee_states, u8 channel_flags, const u8 *msg);
|
u8 *towire_dualopend_reinit(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_feature_set, const u8 *their_init_features, const struct channel_config *our_config, const struct channel_config *their_config, const struct channel_id *channel_id, u32 max_to_self_delay, struct amount_msat min_effective_htlc_capacity_msat, const struct per_peer_state *pps, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, const struct pubkey *their_funding_pubkey, u32 minimum_depth, const struct bitcoin_txid *funding_txid, u16 funding_txout, u32 orignal_feerate_per_kw_funding, u32 most_recent_feerate_per_kw_funding, struct amount_sat funding_satoshi, struct amount_msat our_funding, const struct basepoints *their_basepoints, const struct pubkey *remote_per_commit, const struct wally_psbt *funding_psbt, enum side opener, bool local_funding_locked, bool remote_funding_locked, bool send_shutdown, bool remote_shutdown_received, const u8 *local_shutdown_scriptpubkey, const u8 *remote_shutdown_scriptpubkey, bool remote_funding_sigs_received, const struct fee_states *fee_states, u8 channel_flags);
|
||||||
bool fromwire_dualopend_reinit(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_feature_set, u8 **their_init_features, struct channel_config *our_config, struct channel_config *their_config, struct channel_id *channel_id, u32 *max_to_self_delay, struct amount_msat *min_effective_htlc_capacity_msat, struct per_peer_state **pps, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, struct pubkey *their_funding_pubkey, u32 *minimum_depth, struct bitcoin_txid *funding_txid, u16 *funding_txout, u32 *orignal_feerate_per_kw_funding, u32 *most_recent_feerate_per_kw_funding, struct amount_sat *funding_satoshi, struct amount_msat *our_funding, struct basepoints *their_basepoints, struct pubkey *remote_per_commit, struct wally_psbt **funding_psbt, enum side *opener, bool *local_funding_locked, bool *remote_funding_locked, bool *send_shutdown, bool *remote_shutdown_received, u8 **local_shutdown_scriptpubkey, u8 **remote_shutdown_scriptpubkey, bool *remote_funding_sigs_received, struct fee_states **fee_states, u8 *channel_flags, u8 **msg);
|
bool fromwire_dualopend_reinit(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_feature_set, u8 **their_init_features, struct channel_config *our_config, struct channel_config *their_config, struct channel_id *channel_id, u32 *max_to_self_delay, struct amount_msat *min_effective_htlc_capacity_msat, struct per_peer_state **pps, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, struct pubkey *their_funding_pubkey, u32 *minimum_depth, struct bitcoin_txid *funding_txid, u16 *funding_txout, u32 *orignal_feerate_per_kw_funding, u32 *most_recent_feerate_per_kw_funding, struct amount_sat *funding_satoshi, struct amount_msat *our_funding, struct basepoints *their_basepoints, struct pubkey *remote_per_commit, struct wally_psbt **funding_psbt, enum side *opener, bool *local_funding_locked, bool *remote_funding_locked, bool *send_shutdown, bool *remote_shutdown_received, u8 **local_shutdown_scriptpubkey, u8 **remote_shutdown_scriptpubkey, bool *remote_funding_sigs_received, struct fee_states **fee_states, u8 *channel_flags);
|
||||||
|
|
||||||
/* WIRE: DUALOPEND_GOT_OFFER */
|
/* WIRE: DUALOPEND_GOT_OFFER */
|
||||||
/* dualopend->master: they offered channel */
|
/* dualopend->master: they offered channel */
|
||||||
@@ -216,4 +216,4 @@ bool fromwire_dualopend_dev_memleak_reply(const void *p, bool *leak);
|
|||||||
|
|
||||||
|
|
||||||
#endif /* LIGHTNING_OPENINGD_DUALOPEND_WIREGEN_H */
|
#endif /* LIGHTNING_OPENINGD_DUALOPEND_WIREGEN_H */
|
||||||
// SHA256STAMP:b93c5d3aad8cc2f256ed1205341ff68ea34d5bfc4a0d05071a8fe28177186bc5
|
// SHA256STAMP:0cbaf66a07e1ffa2e01a85398b6937391af66eb78302e22fe7b9a3076963db4e
|
||||||
|
|||||||
@@ -1197,22 +1197,6 @@ static void handle_gossip_in(struct state *state)
|
|||||||
handle_gossip_msg(state->pps, take(msg));
|
handle_gossip_msg(state->pps, take(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*~ Is this message of a `warning` or `error`? If lightningd asked us to send
|
|
||||||
* such a thing, it wants to close the connection. */
|
|
||||||
static void fail_if_warning_or_error(const u8 *inner)
|
|
||||||
{
|
|
||||||
struct channel_id channel_id;
|
|
||||||
u8 *data;
|
|
||||||
|
|
||||||
if (!fromwire_warning(tmpctx, inner, &channel_id, &data)
|
|
||||||
&& !fromwire_error(tmpctx, inner, &channel_id, &data))
|
|
||||||
return;
|
|
||||||
|
|
||||||
status_info("Master said send %s",
|
|
||||||
sanitize_error(tmpctx, inner, NULL));
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Memory leak detection is DEVELOPER-only because we go to great lengths to
|
/* Memory leak detection is DEVELOPER-only because we go to great lengths to
|
||||||
* record the backtrace when allocations occur: without that, the leak
|
* record the backtrace when allocations occur: without that, the leak
|
||||||
* detection tends to be useless for diagnosing where the leak came from, but
|
* detection tends to be useless for diagnosing where the leak came from, but
|
||||||
@@ -1336,7 +1320,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
setup_locale();
|
setup_locale();
|
||||||
|
|
||||||
u8 *msg, *inner;
|
u8 *msg;
|
||||||
struct pollfd pollfd[3];
|
struct pollfd pollfd[3];
|
||||||
struct state *state = tal(NULL, struct state);
|
struct state *state = tal(NULL, struct state);
|
||||||
struct secret *none;
|
struct secret *none;
|
||||||
@@ -1364,7 +1348,6 @@ int main(int argc, char *argv[])
|
|||||||
&state->their_features,
|
&state->their_features,
|
||||||
&state->option_static_remotekey,
|
&state->option_static_remotekey,
|
||||||
&state->option_anchor_outputs,
|
&state->option_anchor_outputs,
|
||||||
&inner,
|
|
||||||
&force_tmp_channel_id,
|
&force_tmp_channel_id,
|
||||||
&dev_fast_gossip))
|
&dev_fast_gossip))
|
||||||
master_badmsg(WIRE_OPENINGD_INIT, msg);
|
master_badmsg(WIRE_OPENINGD_INIT, msg);
|
||||||
@@ -1376,14 +1359,6 @@ int main(int argc, char *argv[])
|
|||||||
/* 3 == peer, 4 == gossipd, 5 = gossip_store, 6 = hsmd */
|
/* 3 == peer, 4 == gossipd, 5 = gossip_store, 6 = hsmd */
|
||||||
per_peer_state_set_fds(state->pps, 3, 4, 5);
|
per_peer_state_set_fds(state->pps, 3, 4, 5);
|
||||||
|
|
||||||
/*~ If lightningd wanted us to send a msg, do so before we waste time
|
|
||||||
* doing work. If it's a warning, we'll close immediately. */
|
|
||||||
if (inner != NULL) {
|
|
||||||
sync_crypto_write(state->pps, inner);
|
|
||||||
fail_if_warning_or_error(inner);
|
|
||||||
tal_free(inner);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*~ Initially we're not associated with a channel, but
|
/*~ Initially we're not associated with a channel, but
|
||||||
* handle_peer_gossip_or_error compares this. */
|
* handle_peer_gossip_or_error compares this. */
|
||||||
memset(&state->channel_id, 0, sizeof(state->channel_id));
|
memset(&state->channel_id, 0, sizeof(state->channel_id));
|
||||||
|
|||||||
@@ -26,9 +26,6 @@ msgdata,openingd_init,lfeatures_len,u16,
|
|||||||
msgdata,openingd_init,lfeatures,u8,lfeatures_len
|
msgdata,openingd_init,lfeatures,u8,lfeatures_len
|
||||||
msgdata,openingd_init,option_static_remotekey,bool,
|
msgdata,openingd_init,option_static_remotekey,bool,
|
||||||
msgdata,openingd_init,option_anchor_outputs,bool,
|
msgdata,openingd_init,option_anchor_outputs,bool,
|
||||||
# Optional msg to send.
|
|
||||||
msgdata,openingd_init,len,u16,
|
|
||||||
msgdata,openingd_init,msg,u8,len
|
|
||||||
msgdata,openingd_init,dev_temporary_channel_id,?byte,32
|
msgdata,openingd_init,dev_temporary_channel_id,?byte,32
|
||||||
msgdata,openingd_init,dev_fast_gossip,bool,
|
msgdata,openingd_init,dev_fast_gossip,bool,
|
||||||
|
|
||||||
|
|||||||
|
16
openingd/openingd_wiregen.c
generated
16
openingd/openingd_wiregen.c
generated
@@ -63,10 +63,9 @@ bool openingd_wire_is_defined(u16 type)
|
|||||||
|
|
||||||
|
|
||||||
/* WIRE: OPENINGD_INIT */
|
/* WIRE: OPENINGD_INIT */
|
||||||
u8 *towire_openingd_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_features, const struct channel_config *our_config, u32 max_to_self_delay, struct amount_msat min_effective_htlc_capacity_msat, const struct per_peer_state *pps, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, u32 minimum_depth, u32 min_feerate, u32 max_feerate, const u8 *lfeatures, bool option_static_remotekey, bool option_anchor_outputs, const u8 *msg, const struct channel_id *dev_temporary_channel_id, bool dev_fast_gossip)
|
u8 *towire_openingd_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_features, const struct channel_config *our_config, u32 max_to_self_delay, struct amount_msat min_effective_htlc_capacity_msat, const struct per_peer_state *pps, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, u32 minimum_depth, u32 min_feerate, u32 max_feerate, const u8 *lfeatures, bool option_static_remotekey, bool option_anchor_outputs, const struct channel_id *dev_temporary_channel_id, bool dev_fast_gossip)
|
||||||
{
|
{
|
||||||
u16 lfeatures_len = tal_count(lfeatures);
|
u16 lfeatures_len = tal_count(lfeatures);
|
||||||
u16 len = tal_count(msg);
|
|
||||||
u8 *p = tal_arr(ctx, u8, 0);
|
u8 *p = tal_arr(ctx, u8, 0);
|
||||||
|
|
||||||
towire_u16(&p, WIRE_OPENINGD_INIT);
|
towire_u16(&p, WIRE_OPENINGD_INIT);
|
||||||
@@ -89,9 +88,6 @@ u8 *towire_openingd_init(const tal_t *ctx, const struct chainparams *chainparams
|
|||||||
towire_u8_array(&p, lfeatures, lfeatures_len);
|
towire_u8_array(&p, lfeatures, lfeatures_len);
|
||||||
towire_bool(&p, option_static_remotekey);
|
towire_bool(&p, option_static_remotekey);
|
||||||
towire_bool(&p, option_anchor_outputs);
|
towire_bool(&p, option_anchor_outputs);
|
||||||
/* Optional msg to send. */
|
|
||||||
towire_u16(&p, len);
|
|
||||||
towire_u8_array(&p, msg, len);
|
|
||||||
if (!dev_temporary_channel_id)
|
if (!dev_temporary_channel_id)
|
||||||
towire_bool(&p, false);
|
towire_bool(&p, false);
|
||||||
else {
|
else {
|
||||||
@@ -102,10 +98,9 @@ u8 *towire_openingd_init(const tal_t *ctx, const struct chainparams *chainparams
|
|||||||
|
|
||||||
return memcheck(p, tal_count(p));
|
return memcheck(p, tal_count(p));
|
||||||
}
|
}
|
||||||
bool fromwire_openingd_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_features, struct channel_config *our_config, u32 *max_to_self_delay, struct amount_msat *min_effective_htlc_capacity_msat, struct per_peer_state **pps, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, u32 *minimum_depth, u32 *min_feerate, u32 *max_feerate, u8 **lfeatures, bool *option_static_remotekey, bool *option_anchor_outputs, u8 **msg, struct channel_id **dev_temporary_channel_id, bool *dev_fast_gossip)
|
bool fromwire_openingd_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_features, struct channel_config *our_config, u32 *max_to_self_delay, struct amount_msat *min_effective_htlc_capacity_msat, struct per_peer_state **pps, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, u32 *minimum_depth, u32 *min_feerate, u32 *max_feerate, u8 **lfeatures, bool *option_static_remotekey, bool *option_anchor_outputs, struct channel_id **dev_temporary_channel_id, bool *dev_fast_gossip)
|
||||||
{
|
{
|
||||||
u16 lfeatures_len;
|
u16 lfeatures_len;
|
||||||
u16 len;
|
|
||||||
|
|
||||||
const u8 *cursor = p;
|
const u8 *cursor = p;
|
||||||
size_t plen = tal_count(p);
|
size_t plen = tal_count(p);
|
||||||
@@ -133,11 +128,6 @@ bool fromwire_openingd_init(const tal_t *ctx, const void *p, const struct chainp
|
|||||||
fromwire_u8_array(&cursor, &plen, *lfeatures, lfeatures_len);
|
fromwire_u8_array(&cursor, &plen, *lfeatures, lfeatures_len);
|
||||||
*option_static_remotekey = fromwire_bool(&cursor, &plen);
|
*option_static_remotekey = fromwire_bool(&cursor, &plen);
|
||||||
*option_anchor_outputs = fromwire_bool(&cursor, &plen);
|
*option_anchor_outputs = fromwire_bool(&cursor, &plen);
|
||||||
/* Optional msg to send. */
|
|
||||||
len = fromwire_u16(&cursor, &plen);
|
|
||||||
// 2nd case msg
|
|
||||||
*msg = len ? tal_arr(ctx, u8, len) : NULL;
|
|
||||||
fromwire_u8_array(&cursor, &plen, *msg, len);
|
|
||||||
if (!fromwire_bool(&cursor, &plen))
|
if (!fromwire_bool(&cursor, &plen))
|
||||||
*dev_temporary_channel_id = NULL;
|
*dev_temporary_channel_id = NULL;
|
||||||
else {
|
else {
|
||||||
@@ -579,4 +569,4 @@ bool fromwire_openingd_dev_memleak_reply(const void *p, bool *leak)
|
|||||||
*leak = fromwire_bool(&cursor, &plen);
|
*leak = fromwire_bool(&cursor, &plen);
|
||||||
return cursor != NULL;
|
return cursor != NULL;
|
||||||
}
|
}
|
||||||
// SHA256STAMP:056c30b94922859252e3b4171c02c1986242c0ec1f71f78ea62c3a0b5d26a696
|
// SHA256STAMP:edd7ee392dff0ddd0dff3a383692ba852a403e64e43290dba5dece69ae438e61
|
||||||
|
|||||||
6
openingd/openingd_wiregen.h
generated
6
openingd/openingd_wiregen.h
generated
@@ -58,8 +58,8 @@ bool openingd_wire_is_defined(u16 type);
|
|||||||
|
|
||||||
|
|
||||||
/* WIRE: OPENINGD_INIT */
|
/* WIRE: OPENINGD_INIT */
|
||||||
u8 *towire_openingd_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_features, const struct channel_config *our_config, u32 max_to_self_delay, struct amount_msat min_effective_htlc_capacity_msat, const struct per_peer_state *pps, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, u32 minimum_depth, u32 min_feerate, u32 max_feerate, const u8 *lfeatures, bool option_static_remotekey, bool option_anchor_outputs, const u8 *msg, const struct channel_id *dev_temporary_channel_id, bool dev_fast_gossip);
|
u8 *towire_openingd_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_features, const struct channel_config *our_config, u32 max_to_self_delay, struct amount_msat min_effective_htlc_capacity_msat, const struct per_peer_state *pps, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, u32 minimum_depth, u32 min_feerate, u32 max_feerate, const u8 *lfeatures, bool option_static_remotekey, bool option_anchor_outputs, const struct channel_id *dev_temporary_channel_id, bool dev_fast_gossip);
|
||||||
bool fromwire_openingd_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_features, struct channel_config *our_config, u32 *max_to_self_delay, struct amount_msat *min_effective_htlc_capacity_msat, struct per_peer_state **pps, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, u32 *minimum_depth, u32 *min_feerate, u32 *max_feerate, u8 **lfeatures, bool *option_static_remotekey, bool *option_anchor_outputs, u8 **msg, struct channel_id **dev_temporary_channel_id, bool *dev_fast_gossip);
|
bool fromwire_openingd_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_features, struct channel_config *our_config, u32 *max_to_self_delay, struct amount_msat *min_effective_htlc_capacity_msat, struct per_peer_state **pps, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, u32 *minimum_depth, u32 *min_feerate, u32 *max_feerate, u8 **lfeatures, bool *option_static_remotekey, bool *option_anchor_outputs, struct channel_id **dev_temporary_channel_id, bool *dev_fast_gossip);
|
||||||
|
|
||||||
/* WIRE: OPENINGD_GOT_OFFER */
|
/* WIRE: OPENINGD_GOT_OFFER */
|
||||||
/* Openingd->master: they offered channel */
|
/* Openingd->master: they offered channel */
|
||||||
@@ -121,4 +121,4 @@ bool fromwire_openingd_dev_memleak_reply(const void *p, bool *leak);
|
|||||||
|
|
||||||
|
|
||||||
#endif /* LIGHTNING_OPENINGD_OPENINGD_WIREGEN_H */
|
#endif /* LIGHTNING_OPENINGD_OPENINGD_WIREGEN_H */
|
||||||
// SHA256STAMP:056c30b94922859252e3b4171c02c1986242c0ec1f71f78ea62c3a0b5d26a696
|
// SHA256STAMP:edd7ee392dff0ddd0dff3a383692ba852a403e64e43290dba5dece69ae438e61
|
||||||
|
|||||||
2
wallet/db_postgres_sqlgen.c
generated
2
wallet/db_postgres_sqlgen.c
generated
@@ -1906,4 +1906,4 @@ struct db_query db_postgres_queries[] = {
|
|||||||
|
|
||||||
#endif /* LIGHTNINGD_WALLET_GEN_DB_POSTGRES */
|
#endif /* LIGHTNINGD_WALLET_GEN_DB_POSTGRES */
|
||||||
|
|
||||||
// SHA256STAMP:c9d9d585e1fcba900b06f41123aa77c6fbd98945ffe485528c2601323f340bed
|
// SHA256STAMP:2839b3ea02654d43cce04742850e4c42541818c1641ab5119f077d859a288e5a
|
||||||
|
|||||||
2
wallet/db_sqlite3_sqlgen.c
generated
2
wallet/db_sqlite3_sqlgen.c
generated
@@ -1906,4 +1906,4 @@ struct db_query db_sqlite3_queries[] = {
|
|||||||
|
|
||||||
#endif /* LIGHTNINGD_WALLET_GEN_DB_SQLITE3 */
|
#endif /* LIGHTNINGD_WALLET_GEN_DB_SQLITE3 */
|
||||||
|
|
||||||
// SHA256STAMP:c9d9d585e1fcba900b06f41123aa77c6fbd98945ffe485528c2601323f340bed
|
// SHA256STAMP:2839b3ea02654d43cce04742850e4c42541818c1641ab5119f077d859a288e5a
|
||||||
|
|||||||
6
wallet/statements_gettextgen.po
generated
6
wallet/statements_gettextgen.po
generated
@@ -1250,11 +1250,11 @@ msgstr ""
|
|||||||
msgid "not a valid SQL statement"
|
msgid "not a valid SQL statement"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: wallet/test/run-wallet.c:1455
|
#: wallet/test/run-wallet.c:1451
|
||||||
msgid "SELECT COUNT(1) FROM channel_funding_inflights WHERE channel_id = ?;"
|
msgid "SELECT COUNT(1) FROM channel_funding_inflights WHERE channel_id = ?;"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: wallet/test/run-wallet.c:1653
|
#: wallet/test/run-wallet.c:1649
|
||||||
msgid "INSERT INTO channels (id) VALUES (1);"
|
msgid "INSERT INTO channels (id) VALUES (1);"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
# SHA256STAMP:ef55222dd765f18ae8d8f000c51b6024bbe7acafc17dd0b6837a180d7b736270
|
# SHA256STAMP:61244f420c5eefe9cf60f0599cdd6c17d38f719ed2bc5acac93ee1109f121dcf
|
||||||
|
|||||||
@@ -641,8 +641,7 @@ void peer_memleak_done(struct command *cmd UNNEEDED, struct subd *leaker UNNEEDE
|
|||||||
/* Generated stub for peer_restart_dualopend */
|
/* Generated stub for peer_restart_dualopend */
|
||||||
void peer_restart_dualopend(struct peer *peer UNNEEDED,
|
void peer_restart_dualopend(struct peer *peer UNNEEDED,
|
||||||
struct per_peer_state *pps UNNEEDED,
|
struct per_peer_state *pps UNNEEDED,
|
||||||
struct channel *channel UNNEEDED,
|
struct channel *channel UNNEEDED)
|
||||||
const u8 *send_msg UNNEEDED)
|
|
||||||
{ fprintf(stderr, "peer_restart_dualopend called!\n"); abort(); }
|
{ fprintf(stderr, "peer_restart_dualopend called!\n"); abort(); }
|
||||||
/* Generated stub for peer_start_channeld */
|
/* Generated stub for peer_start_channeld */
|
||||||
void peer_start_channeld(struct channel *channel UNNEEDED,
|
void peer_start_channeld(struct channel *channel UNNEEDED,
|
||||||
@@ -657,14 +656,11 @@ void peer_start_closingd(struct channel *channel UNNEEDED,
|
|||||||
const u8 *channel_reestablish UNNEEDED)
|
const u8 *channel_reestablish UNNEEDED)
|
||||||
{ fprintf(stderr, "peer_start_closingd called!\n"); abort(); }
|
{ fprintf(stderr, "peer_start_closingd called!\n"); abort(); }
|
||||||
/* Generated stub for peer_start_dualopend */
|
/* Generated stub for peer_start_dualopend */
|
||||||
void peer_start_dualopend(struct peer *peer UNNEEDED,
|
void peer_start_dualopend(struct peer *peer UNNEEDED, struct per_peer_state *pps UNNEEDED)
|
||||||
struct per_peer_state *pps UNNEEDED,
|
|
||||||
const u8 *send_msg UNNEEDED)
|
|
||||||
{ fprintf(stderr, "peer_start_dualopend called!\n"); abort(); }
|
{ fprintf(stderr, "peer_start_dualopend called!\n"); abort(); }
|
||||||
/* Generated stub for peer_start_openingd */
|
/* Generated stub for peer_start_openingd */
|
||||||
void peer_start_openingd(struct peer *peer UNNEEDED,
|
void peer_start_openingd(struct peer *peer UNNEEDED,
|
||||||
struct per_peer_state *pps UNNEEDED,
|
struct per_peer_state *pps UNNEEDED)
|
||||||
const u8 *msg UNNEEDED)
|
|
||||||
{ fprintf(stderr, "peer_start_openingd called!\n"); abort(); }
|
{ fprintf(stderr, "peer_start_openingd called!\n"); abort(); }
|
||||||
/* Generated stub for peer_wire_is_defined */
|
/* Generated stub for peer_wire_is_defined */
|
||||||
bool peer_wire_is_defined(u16 type UNNEEDED)
|
bool peer_wire_is_defined(u16 type UNNEEDED)
|
||||||
|
|||||||
Reference in New Issue
Block a user