mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
df-feerates: send back original + last known feerates
For calculating the next RBF attempt's feerate, we need some historical information about the feerate used for this channel
This commit is contained in:
parent
fe688ab718
commit
063948d51a
@ -2162,7 +2162,7 @@ static void handle_commit_received(struct subd *dualopend,
|
|||||||
struct bitcoin_signature remote_commit_sig;
|
struct bitcoin_signature remote_commit_sig;
|
||||||
struct bitcoin_txid funding_txid;
|
struct bitcoin_txid funding_txid;
|
||||||
u16 funding_outnum;
|
u16 funding_outnum;
|
||||||
u32 feerate_funding, feerate_commitment = 0;
|
u32 feerate_funding, feerate_commitment;
|
||||||
struct amount_sat total_funding, funding_ours;
|
struct amount_sat total_funding, funding_ours;
|
||||||
u8 *remote_upfront_shutdown_script,
|
u8 *remote_upfront_shutdown_script,
|
||||||
*local_upfront_shutdown_script;
|
*local_upfront_shutdown_script;
|
||||||
@ -2195,6 +2195,7 @@ static void handle_commit_received(struct subd *dualopend,
|
|||||||
&funding_ours,
|
&funding_ours,
|
||||||
&channel->channel_flags,
|
&channel->channel_flags,
|
||||||
&feerate_funding,
|
&feerate_funding,
|
||||||
|
&feerate_commitment,
|
||||||
&channel->our_config.channel_reserve,
|
&channel->our_config.channel_reserve,
|
||||||
&local_upfront_shutdown_script,
|
&local_upfront_shutdown_script,
|
||||||
&remote_upfront_shutdown_script)) {
|
&remote_upfront_shutdown_script)) {
|
||||||
@ -2493,7 +2494,7 @@ void peer_restart_dualopend(struct peer *peer,
|
|||||||
u32 max_to_self_delay;
|
u32 max_to_self_delay;
|
||||||
struct amount_msat min_effective_htlc_capacity;
|
struct amount_msat min_effective_htlc_capacity;
|
||||||
struct channel_config unused_config;
|
struct channel_config unused_config;
|
||||||
struct channel_inflight *inflight;
|
struct channel_inflight *inflight, *first_inflight;
|
||||||
int hsmfd;
|
int hsmfd;
|
||||||
u8 *msg;
|
u8 *msg;
|
||||||
|
|
||||||
@ -2532,6 +2533,11 @@ void peer_restart_dualopend(struct peer *peer,
|
|||||||
&min_effective_htlc_capacity);
|
&min_effective_htlc_capacity);
|
||||||
|
|
||||||
inflight = channel_current_inflight(channel);
|
inflight = channel_current_inflight(channel);
|
||||||
|
/* Get the first inflight to figure out the original feerate
|
||||||
|
* for this channel. It's fine if it's the same as the current */
|
||||||
|
first_inflight = list_top(&channel->inflights,
|
||||||
|
struct channel_inflight,
|
||||||
|
list);
|
||||||
msg = towire_dualopend_reinit(NULL,
|
msg = towire_dualopend_reinit(NULL,
|
||||||
chainparams,
|
chainparams,
|
||||||
peer->ld->our_features,
|
peer->ld->our_features,
|
||||||
@ -2548,8 +2554,10 @@ void peer_restart_dualopend(struct peer *peer,
|
|||||||
channel->minimum_depth,
|
channel->minimum_depth,
|
||||||
feerate_min(peer->ld, NULL),
|
feerate_min(peer->ld, NULL),
|
||||||
feerate_max(peer->ld, NULL),
|
feerate_max(peer->ld, NULL),
|
||||||
&channel->funding_txid,
|
&inflight->funding->txid,
|
||||||
channel->funding_outnum,
|
inflight->funding->outnum,
|
||||||
|
first_inflight->funding->feerate,
|
||||||
|
inflight->funding->feerate,
|
||||||
channel->funding,
|
channel->funding,
|
||||||
channel->our_msat,
|
channel->our_msat,
|
||||||
&channel->channel_info.theirbase,
|
&channel->channel_info.theirbase,
|
||||||
|
@ -1715,6 +1715,7 @@ static u8 *accepter_commits(struct state *state,
|
|||||||
total,
|
total,
|
||||||
tx_state->accepter_funding,
|
tx_state->accepter_funding,
|
||||||
state->channel_flags,
|
state->channel_flags,
|
||||||
|
tx_state->feerate_per_kw_funding,
|
||||||
state->feerate_per_kw_commitment,
|
state->feerate_per_kw_commitment,
|
||||||
tx_state->localconf.channel_reserve,
|
tx_state->localconf.channel_reserve,
|
||||||
state->upfront_shutdown_script[LOCAL],
|
state->upfront_shutdown_script[LOCAL],
|
||||||
@ -2218,6 +2219,7 @@ static u8 *opener_commits(struct state *state,
|
|||||||
total,
|
total,
|
||||||
tx_state->opener_funding,
|
tx_state->opener_funding,
|
||||||
state->channel_flags,
|
state->channel_flags,
|
||||||
|
tx_state->feerate_per_kw_funding,
|
||||||
state->feerate_per_kw_commitment,
|
state->feerate_per_kw_commitment,
|
||||||
tx_state->localconf.channel_reserve,
|
tx_state->localconf.channel_reserve,
|
||||||
state->upfront_shutdown_script[LOCAL],
|
state->upfront_shutdown_script[LOCAL],
|
||||||
@ -3259,6 +3261,8 @@ int main(int argc, char *argv[])
|
|||||||
&state->max_feerate,
|
&state->max_feerate,
|
||||||
&state->tx_state->funding_txid,
|
&state->tx_state->funding_txid,
|
||||||
&state->tx_state->funding_txout,
|
&state->tx_state->funding_txout,
|
||||||
|
&state->feerate_per_kw_funding,
|
||||||
|
&state->tx_state->feerate_per_kw_funding,
|
||||||
&total_funding,
|
&total_funding,
|
||||||
&our_msat,
|
&our_msat,
|
||||||
&state->their_points,
|
&state->their_points,
|
||||||
@ -3298,6 +3302,10 @@ int main(int argc, char *argv[])
|
|||||||
state->our_role = TX_INITIATOR;
|
state->our_role = TX_INITIATOR;
|
||||||
else
|
else
|
||||||
state->our_role = TX_ACCEPTER;
|
state->our_role = TX_ACCEPTER;
|
||||||
|
|
||||||
|
/* We can pull the commitment feerate out of the feestates */
|
||||||
|
state->feerate_per_kw_commitment
|
||||||
|
= get_feerate(fee_states, opener, LOCAL);
|
||||||
} else
|
} else
|
||||||
master_badmsg(fromwire_peektype(msg), msg);
|
master_badmsg(fromwire_peektype(msg), msg);
|
||||||
|
|
||||||
|
@ -52,6 +52,8 @@ msgdata,dualopend_reinit,min_feerate,u32,
|
|||||||
msgdata,dualopend_reinit,max_feerate,u32,
|
msgdata,dualopend_reinit,max_feerate,u32,
|
||||||
msgdata,dualopend_reinit,funding_txid,bitcoin_txid,
|
msgdata,dualopend_reinit,funding_txid,bitcoin_txid,
|
||||||
msgdata,dualopend_reinit,funding_txout,u16,
|
msgdata,dualopend_reinit,funding_txout,u16,
|
||||||
|
msgdata,dualopend_reinit,orignal_feerate_per_kw_funding,u32,
|
||||||
|
msgdata,dualopend_reinit,most_recent_feerate_per_kw_funding,u32,
|
||||||
msgdata,dualopend_reinit,funding_satoshi,amount_sat,
|
msgdata,dualopend_reinit,funding_satoshi,amount_sat,
|
||||||
msgdata,dualopend_reinit,our_funding,amount_msat,
|
msgdata,dualopend_reinit,our_funding,amount_msat,
|
||||||
msgdata,dualopend_reinit,their_basepoints,basepoints,
|
msgdata,dualopend_reinit,their_basepoints,basepoints,
|
||||||
@ -137,7 +139,8 @@ msgdata,dualopend_commit_rcvd,funding_txout,u16,
|
|||||||
msgdata,dualopend_commit_rcvd,funding_satoshis,amount_sat,
|
msgdata,dualopend_commit_rcvd,funding_satoshis,amount_sat,
|
||||||
msgdata,dualopend_commit_rcvd,our_funding_sats,amount_sat,
|
msgdata,dualopend_commit_rcvd,our_funding_sats,amount_sat,
|
||||||
msgdata,dualopend_commit_rcvd,channel_flags,u8,
|
msgdata,dualopend_commit_rcvd,channel_flags,u8,
|
||||||
msgdata,dualopend_commit_rcvd,feerate_per_kw,u32,
|
msgdata,dualopend_commit_rcvd,feerate_per_kw_funding,u32,
|
||||||
|
msgdata,dualopend_commit_rcvd,feerate_per_kw_commitment,u32,
|
||||||
msgdata,dualopend_commit_rcvd,our_channel_reserve_satoshis,amount_sat,
|
msgdata,dualopend_commit_rcvd,our_channel_reserve_satoshis,amount_sat,
|
||||||
msgdata,dualopend_commit_rcvd,local_shutdown_len,u16,
|
msgdata,dualopend_commit_rcvd,local_shutdown_len,u16,
|
||||||
msgdata,dualopend_commit_rcvd,local_shutdown_scriptpubkey,u8,local_shutdown_len
|
msgdata,dualopend_commit_rcvd,local_shutdown_scriptpubkey,u8,local_shutdown_len
|
||||||
|
Can't render this file because it has a wrong number of fields in line 13.
|
20
openingd/dualopend_wiregen.c
generated
20
openingd/dualopend_wiregen.c
generated
@ -162,7 +162,7 @@ bool fromwire_dualopend_init(const tal_t *ctx, const void *p, const struct chain
|
|||||||
|
|
||||||
/* 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, u32 min_feerate, u32 max_feerate, const struct bitcoin_txid *funding_txid, u16 funding_txout, 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, u32 min_feerate, u32 max_feerate, 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)
|
||||||
{
|
{
|
||||||
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);
|
||||||
@ -189,6 +189,8 @@ u8 *towire_dualopend_reinit(const tal_t *ctx, const struct chainparams *chainpar
|
|||||||
towire_u32(&p, max_feerate);
|
towire_u32(&p, max_feerate);
|
||||||
towire_bitcoin_txid(&p, funding_txid);
|
towire_bitcoin_txid(&p, funding_txid);
|
||||||
towire_u16(&p, funding_txout);
|
towire_u16(&p, funding_txout);
|
||||||
|
towire_u32(&p, orignal_feerate_per_kw_funding);
|
||||||
|
towire_u32(&p, most_recent_feerate_per_kw_funding);
|
||||||
towire_amount_sat(&p, funding_satoshi);
|
towire_amount_sat(&p, funding_satoshi);
|
||||||
towire_amount_msat(&p, our_funding);
|
towire_amount_msat(&p, our_funding);
|
||||||
towire_basepoints(&p, their_basepoints);
|
towire_basepoints(&p, their_basepoints);
|
||||||
@ -212,7 +214,7 @@ u8 *towire_dualopend_reinit(const tal_t *ctx, const struct chainparams *chainpar
|
|||||||
|
|
||||||
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, u32 *min_feerate, u32 *max_feerate, struct bitcoin_txid *funding_txid, u16 *funding_txout, 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, u32 *min_feerate, u32 *max_feerate, 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)
|
||||||
{
|
{
|
||||||
u16 their_init_features_len;
|
u16 their_init_features_len;
|
||||||
u16 local_shutdown_len;
|
u16 local_shutdown_len;
|
||||||
@ -244,6 +246,8 @@ bool fromwire_dualopend_reinit(const tal_t *ctx, const void *p, const struct cha
|
|||||||
*max_feerate = fromwire_u32(&cursor, &plen);
|
*max_feerate = fromwire_u32(&cursor, &plen);
|
||||||
fromwire_bitcoin_txid(&cursor, &plen, funding_txid);
|
fromwire_bitcoin_txid(&cursor, &plen, funding_txid);
|
||||||
*funding_txout = fromwire_u16(&cursor, &plen);
|
*funding_txout = fromwire_u16(&cursor, &plen);
|
||||||
|
*orignal_feerate_per_kw_funding = fromwire_u32(&cursor, &plen);
|
||||||
|
*most_recent_feerate_per_kw_funding = fromwire_u32(&cursor, &plen);
|
||||||
*funding_satoshi = fromwire_amount_sat(&cursor, &plen);
|
*funding_satoshi = fromwire_amount_sat(&cursor, &plen);
|
||||||
*our_funding = fromwire_amount_msat(&cursor, &plen);
|
*our_funding = fromwire_amount_msat(&cursor, &plen);
|
||||||
fromwire_basepoints(&cursor, &plen, their_basepoints);
|
fromwire_basepoints(&cursor, &plen, their_basepoints);
|
||||||
@ -460,7 +464,7 @@ bool fromwire_dualopend_rbf_valid(const void *p)
|
|||||||
/* WIRE: DUALOPEND_COMMIT_RCVD */
|
/* WIRE: DUALOPEND_COMMIT_RCVD */
|
||||||
/* dualopend->master: ready to commit channel open to database and */
|
/* dualopend->master: ready to commit channel open to database and */
|
||||||
/* get some signatures for the funding_tx. */
|
/* get some signatures for the funding_tx. */
|
||||||
u8 *towire_dualopend_commit_rcvd(const tal_t *ctx, const struct channel_config *their_config, const struct bitcoin_tx *remote_first_commit, const struct penalty_base *pbase, const struct bitcoin_signature *first_commit_sig, const struct wally_psbt *psbt, const struct pubkey *revocation_basepoint, const struct pubkey *payment_basepoint, const struct pubkey *htlc_basepoint, const struct pubkey *delayed_payment_basepoint, const struct pubkey *their_per_commit_point, const struct pubkey *remote_fundingkey, const struct bitcoin_txid *funding_txid, u16 funding_txout, struct amount_sat funding_satoshis, struct amount_sat our_funding_sats, u8 channel_flags, u32 feerate_per_kw, struct amount_sat our_channel_reserve_satoshis, const u8 *local_shutdown_scriptpubkey, const u8 *remote_shutdown_scriptpubkey)
|
u8 *towire_dualopend_commit_rcvd(const tal_t *ctx, const struct channel_config *their_config, const struct bitcoin_tx *remote_first_commit, const struct penalty_base *pbase, const struct bitcoin_signature *first_commit_sig, const struct wally_psbt *psbt, const struct pubkey *revocation_basepoint, const struct pubkey *payment_basepoint, const struct pubkey *htlc_basepoint, const struct pubkey *delayed_payment_basepoint, const struct pubkey *their_per_commit_point, const struct pubkey *remote_fundingkey, const struct bitcoin_txid *funding_txid, u16 funding_txout, struct amount_sat funding_satoshis, struct amount_sat our_funding_sats, u8 channel_flags, u32 feerate_per_kw_funding, u32 feerate_per_kw_commitment, struct amount_sat our_channel_reserve_satoshis, const u8 *local_shutdown_scriptpubkey, const u8 *remote_shutdown_scriptpubkey)
|
||||||
{
|
{
|
||||||
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);
|
||||||
@ -488,7 +492,8 @@ u8 *towire_dualopend_commit_rcvd(const tal_t *ctx, const struct channel_config *
|
|||||||
towire_amount_sat(&p, funding_satoshis);
|
towire_amount_sat(&p, funding_satoshis);
|
||||||
towire_amount_sat(&p, our_funding_sats);
|
towire_amount_sat(&p, our_funding_sats);
|
||||||
towire_u8(&p, channel_flags);
|
towire_u8(&p, channel_flags);
|
||||||
towire_u32(&p, feerate_per_kw);
|
towire_u32(&p, feerate_per_kw_funding);
|
||||||
|
towire_u32(&p, feerate_per_kw_commitment);
|
||||||
towire_amount_sat(&p, our_channel_reserve_satoshis);
|
towire_amount_sat(&p, our_channel_reserve_satoshis);
|
||||||
towire_u16(&p, local_shutdown_len);
|
towire_u16(&p, local_shutdown_len);
|
||||||
towire_u8_array(&p, local_shutdown_scriptpubkey, local_shutdown_len);
|
towire_u8_array(&p, local_shutdown_scriptpubkey, local_shutdown_len);
|
||||||
@ -497,7 +502,7 @@ u8 *towire_dualopend_commit_rcvd(const tal_t *ctx, const struct channel_config *
|
|||||||
|
|
||||||
return memcheck(p, tal_count(p));
|
return memcheck(p, tal_count(p));
|
||||||
}
|
}
|
||||||
bool fromwire_dualopend_commit_rcvd(const tal_t *ctx, const void *p, struct channel_config *their_config, struct bitcoin_tx **remote_first_commit, struct penalty_base **pbase, struct bitcoin_signature *first_commit_sig, struct wally_psbt **psbt, struct pubkey *revocation_basepoint, struct pubkey *payment_basepoint, struct pubkey *htlc_basepoint, struct pubkey *delayed_payment_basepoint, struct pubkey *their_per_commit_point, struct pubkey *remote_fundingkey, struct bitcoin_txid *funding_txid, u16 *funding_txout, struct amount_sat *funding_satoshis, struct amount_sat *our_funding_sats, u8 *channel_flags, u32 *feerate_per_kw, struct amount_sat *our_channel_reserve_satoshis, u8 **local_shutdown_scriptpubkey, u8 **remote_shutdown_scriptpubkey)
|
bool fromwire_dualopend_commit_rcvd(const tal_t *ctx, const void *p, struct channel_config *their_config, struct bitcoin_tx **remote_first_commit, struct penalty_base **pbase, struct bitcoin_signature *first_commit_sig, struct wally_psbt **psbt, struct pubkey *revocation_basepoint, struct pubkey *payment_basepoint, struct pubkey *htlc_basepoint, struct pubkey *delayed_payment_basepoint, struct pubkey *their_per_commit_point, struct pubkey *remote_fundingkey, struct bitcoin_txid *funding_txid, u16 *funding_txout, struct amount_sat *funding_satoshis, struct amount_sat *our_funding_sats, u8 *channel_flags, u32 *feerate_per_kw_funding, u32 *feerate_per_kw_commitment, struct amount_sat *our_channel_reserve_satoshis, u8 **local_shutdown_scriptpubkey, u8 **remote_shutdown_scriptpubkey)
|
||||||
{
|
{
|
||||||
u16 local_shutdown_len;
|
u16 local_shutdown_len;
|
||||||
u16 remote_shutdown_len;
|
u16 remote_shutdown_len;
|
||||||
@ -528,7 +533,8 @@ bool fromwire_dualopend_commit_rcvd(const tal_t *ctx, const void *p, struct chan
|
|||||||
*funding_satoshis = fromwire_amount_sat(&cursor, &plen);
|
*funding_satoshis = fromwire_amount_sat(&cursor, &plen);
|
||||||
*our_funding_sats = fromwire_amount_sat(&cursor, &plen);
|
*our_funding_sats = fromwire_amount_sat(&cursor, &plen);
|
||||||
*channel_flags = fromwire_u8(&cursor, &plen);
|
*channel_flags = fromwire_u8(&cursor, &plen);
|
||||||
*feerate_per_kw = fromwire_u32(&cursor, &plen);
|
*feerate_per_kw_funding = fromwire_u32(&cursor, &plen);
|
||||||
|
*feerate_per_kw_commitment = fromwire_u32(&cursor, &plen);
|
||||||
*our_channel_reserve_satoshis = fromwire_amount_sat(&cursor, &plen);
|
*our_channel_reserve_satoshis = fromwire_amount_sat(&cursor, &plen);
|
||||||
local_shutdown_len = fromwire_u16(&cursor, &plen);
|
local_shutdown_len = fromwire_u16(&cursor, &plen);
|
||||||
// 2nd case local_shutdown_scriptpubkey
|
// 2nd case local_shutdown_scriptpubkey
|
||||||
@ -964,4 +970,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:523781b6cb29d5c57de5819abb73f492b34e9b42a91b9304a38315b194f9c85c
|
// SHA256STAMP:16b6a5025dbdb4cd770749cf8557990d0a4ff2b85ad6fca17ce91769dd22fd68
|
||||||
|
10
openingd/dualopend_wiregen.h
generated
10
openingd/dualopend_wiregen.h
generated
@ -93,8 +93,8 @@ bool fromwire_dualopend_init(const tal_t *ctx, const void *p, const struct chain
|
|||||||
|
|
||||||
/* 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, u32 min_feerate, u32 max_feerate, const struct bitcoin_txid *funding_txid, u16 funding_txout, 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, u32 min_feerate, u32 max_feerate, 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);
|
||||||
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, u32 *min_feerate, u32 *max_feerate, struct bitcoin_txid *funding_txid, u16 *funding_txout, 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, u32 *min_feerate, u32 *max_feerate, 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);
|
||||||
|
|
||||||
/* WIRE: DUALOPEND_GOT_OFFER */
|
/* WIRE: DUALOPEND_GOT_OFFER */
|
||||||
/* dualopend->master: they offered channel */
|
/* dualopend->master: they offered channel */
|
||||||
@ -129,8 +129,8 @@ bool fromwire_dualopend_rbf_valid(const void *p);
|
|||||||
/* WIRE: DUALOPEND_COMMIT_RCVD */
|
/* WIRE: DUALOPEND_COMMIT_RCVD */
|
||||||
/* dualopend->master: ready to commit channel open to database and */
|
/* dualopend->master: ready to commit channel open to database and */
|
||||||
/* get some signatures for the funding_tx. */
|
/* get some signatures for the funding_tx. */
|
||||||
u8 *towire_dualopend_commit_rcvd(const tal_t *ctx, const struct channel_config *their_config, const struct bitcoin_tx *remote_first_commit, const struct penalty_base *pbase, const struct bitcoin_signature *first_commit_sig, const struct wally_psbt *psbt, const struct pubkey *revocation_basepoint, const struct pubkey *payment_basepoint, const struct pubkey *htlc_basepoint, const struct pubkey *delayed_payment_basepoint, const struct pubkey *their_per_commit_point, const struct pubkey *remote_fundingkey, const struct bitcoin_txid *funding_txid, u16 funding_txout, struct amount_sat funding_satoshis, struct amount_sat our_funding_sats, u8 channel_flags, u32 feerate_per_kw, struct amount_sat our_channel_reserve_satoshis, const u8 *local_shutdown_scriptpubkey, const u8 *remote_shutdown_scriptpubkey);
|
u8 *towire_dualopend_commit_rcvd(const tal_t *ctx, const struct channel_config *their_config, const struct bitcoin_tx *remote_first_commit, const struct penalty_base *pbase, const struct bitcoin_signature *first_commit_sig, const struct wally_psbt *psbt, const struct pubkey *revocation_basepoint, const struct pubkey *payment_basepoint, const struct pubkey *htlc_basepoint, const struct pubkey *delayed_payment_basepoint, const struct pubkey *their_per_commit_point, const struct pubkey *remote_fundingkey, const struct bitcoin_txid *funding_txid, u16 funding_txout, struct amount_sat funding_satoshis, struct amount_sat our_funding_sats, u8 channel_flags, u32 feerate_per_kw_funding, u32 feerate_per_kw_commitment, struct amount_sat our_channel_reserve_satoshis, const u8 *local_shutdown_scriptpubkey, const u8 *remote_shutdown_scriptpubkey);
|
||||||
bool fromwire_dualopend_commit_rcvd(const tal_t *ctx, const void *p, struct channel_config *their_config, struct bitcoin_tx **remote_first_commit, struct penalty_base **pbase, struct bitcoin_signature *first_commit_sig, struct wally_psbt **psbt, struct pubkey *revocation_basepoint, struct pubkey *payment_basepoint, struct pubkey *htlc_basepoint, struct pubkey *delayed_payment_basepoint, struct pubkey *their_per_commit_point, struct pubkey *remote_fundingkey, struct bitcoin_txid *funding_txid, u16 *funding_txout, struct amount_sat *funding_satoshis, struct amount_sat *our_funding_sats, u8 *channel_flags, u32 *feerate_per_kw, struct amount_sat *our_channel_reserve_satoshis, u8 **local_shutdown_scriptpubkey, u8 **remote_shutdown_scriptpubkey);
|
bool fromwire_dualopend_commit_rcvd(const tal_t *ctx, const void *p, struct channel_config *their_config, struct bitcoin_tx **remote_first_commit, struct penalty_base **pbase, struct bitcoin_signature *first_commit_sig, struct wally_psbt **psbt, struct pubkey *revocation_basepoint, struct pubkey *payment_basepoint, struct pubkey *htlc_basepoint, struct pubkey *delayed_payment_basepoint, struct pubkey *their_per_commit_point, struct pubkey *remote_fundingkey, struct bitcoin_txid *funding_txid, u16 *funding_txout, struct amount_sat *funding_satoshis, struct amount_sat *our_funding_sats, u8 *channel_flags, u32 *feerate_per_kw_funding, u32 *feerate_per_kw_commitment, struct amount_sat *our_channel_reserve_satoshis, u8 **local_shutdown_scriptpubkey, u8 **remote_shutdown_scriptpubkey);
|
||||||
|
|
||||||
/* WIRE: DUALOPEND_PSBT_CHANGED */
|
/* WIRE: DUALOPEND_PSBT_CHANGED */
|
||||||
/* dualopend->master: peer updated the psbt */
|
/* dualopend->master: peer updated the psbt */
|
||||||
@ -223,4 +223,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:523781b6cb29d5c57de5819abb73f492b34e9b42a91b9304a38315b194f9c85c
|
// SHA256STAMP:16b6a5025dbdb4cd770749cf8557990d0a4ff2b85ad6fca17ce91769dd22fd68
|
||||||
|
Loading…
Reference in New Issue
Block a user