mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
df: rename 'feerate_per_kw' to 'feerate_per_kw_commitment'
Differentiate btw feerate for commitment txs and feerate for funding transaction.
This commit is contained in:
@@ -100,7 +100,7 @@ struct state {
|
|||||||
enum tx_role our_role;
|
enum tx_role our_role;
|
||||||
|
|
||||||
u32 feerate_per_kw_funding;
|
u32 feerate_per_kw_funding;
|
||||||
u32 feerate_per_kw;
|
u32 feerate_per_kw_commitment;
|
||||||
|
|
||||||
struct bitcoin_txid funding_txid;
|
struct bitcoin_txid funding_txid;
|
||||||
u16 funding_txout;
|
u16 funding_txout;
|
||||||
@@ -1146,7 +1146,7 @@ static u8 *accepter_start(struct state *state, const u8 *oc2_msg)
|
|||||||
&state->remoteconf.dust_limit,
|
&state->remoteconf.dust_limit,
|
||||||
&state->remoteconf.max_htlc_value_in_flight,
|
&state->remoteconf.max_htlc_value_in_flight,
|
||||||
&state->remoteconf.htlc_minimum,
|
&state->remoteconf.htlc_minimum,
|
||||||
&state->feerate_per_kw,
|
&state->feerate_per_kw_commitment,
|
||||||
&state->remoteconf.to_self_delay,
|
&state->remoteconf.to_self_delay,
|
||||||
&state->remoteconf.max_accepted_htlcs,
|
&state->remoteconf.max_accepted_htlcs,
|
||||||
&state->tx_locktime,
|
&state->tx_locktime,
|
||||||
@@ -1214,7 +1214,7 @@ static u8 *accepter_start(struct state *state, const u8 *oc2_msg)
|
|||||||
feerate_max,
|
feerate_max,
|
||||||
feerate_min,
|
feerate_min,
|
||||||
feerate_best,
|
feerate_best,
|
||||||
state->feerate_per_kw,
|
state->feerate_per_kw_commitment,
|
||||||
state->remoteconf.to_self_delay,
|
state->remoteconf.to_self_delay,
|
||||||
state->remoteconf.max_accepted_htlcs,
|
state->remoteconf.max_accepted_htlcs,
|
||||||
channel_flags,
|
channel_flags,
|
||||||
@@ -1278,7 +1278,8 @@ static u8 *accepter_start(struct state *state, const u8 *oc2_msg)
|
|||||||
/* Now that we know the total of the channel, we can set the reserve */
|
/* Now that we know the total of the channel, we can set the reserve */
|
||||||
set_reserve(state, total);
|
set_reserve(state, total);
|
||||||
|
|
||||||
if (!check_config_bounds(tmpctx, total, state->feerate_per_kw,
|
if (!check_config_bounds(tmpctx, total,
|
||||||
|
state->feerate_per_kw_commitment,
|
||||||
state->max_to_self_delay,
|
state->max_to_self_delay,
|
||||||
state->min_effective_htlc_capacity,
|
state->min_effective_htlc_capacity,
|
||||||
&state->remoteconf,
|
&state->remoteconf,
|
||||||
@@ -1390,7 +1391,7 @@ static u8 *accepter_start(struct state *state, const u8 *oc2_msg)
|
|||||||
our_msats,
|
our_msats,
|
||||||
take(new_fee_states(
|
take(new_fee_states(
|
||||||
NULL, REMOTE,
|
NULL, REMOTE,
|
||||||
&state->feerate_per_kw)),
|
&state->feerate_per_kw_commitment)),
|
||||||
&state->localconf,
|
&state->localconf,
|
||||||
&state->remoteconf,
|
&state->remoteconf,
|
||||||
&state->our_points, &state->their_points,
|
&state->our_points, &state->their_points,
|
||||||
@@ -1503,7 +1504,7 @@ static u8 *accepter_start(struct state *state, const u8 *oc2_msg)
|
|||||||
total,
|
total,
|
||||||
state->accepter_funding,
|
state->accepter_funding,
|
||||||
channel_flags,
|
channel_flags,
|
||||||
state->feerate_per_kw,
|
state->feerate_per_kw_commitment,
|
||||||
msg,
|
msg,
|
||||||
state->localconf.channel_reserve,
|
state->localconf.channel_reserve,
|
||||||
state->upfront_shutdown_script[LOCAL],
|
state->upfront_shutdown_script[LOCAL],
|
||||||
@@ -1535,7 +1536,7 @@ static u8 *opener_start(struct state *state, u8 *msg)
|
|||||||
&psbt,
|
&psbt,
|
||||||
&state->opener_funding,
|
&state->opener_funding,
|
||||||
&state->upfront_shutdown_script[LOCAL],
|
&state->upfront_shutdown_script[LOCAL],
|
||||||
&state->feerate_per_kw,
|
&state->feerate_per_kw_commitment,
|
||||||
&state->feerate_per_kw_funding,
|
&state->feerate_per_kw_funding,
|
||||||
&channel_flags))
|
&channel_flags))
|
||||||
master_badmsg(WIRE_DUAL_OPEN_OPENER_INIT, msg);
|
master_badmsg(WIRE_DUAL_OPEN_OPENER_INIT, msg);
|
||||||
@@ -1586,7 +1587,7 @@ static u8 *opener_start(struct state *state, u8 *msg)
|
|||||||
state->localconf.dust_limit,
|
state->localconf.dust_limit,
|
||||||
state->localconf.max_htlc_value_in_flight,
|
state->localconf.max_htlc_value_in_flight,
|
||||||
state->localconf.htlc_minimum,
|
state->localconf.htlc_minimum,
|
||||||
state->feerate_per_kw,
|
state->feerate_per_kw_commitment,
|
||||||
state->localconf.to_self_delay,
|
state->localconf.to_self_delay,
|
||||||
state->localconf.max_accepted_htlcs,
|
state->localconf.max_accepted_htlcs,
|
||||||
state->tx_locktime,
|
state->tx_locktime,
|
||||||
@@ -1717,7 +1718,8 @@ static u8 *opener_start(struct state *state, u8 *msg)
|
|||||||
* set the reserve */
|
* set the reserve */
|
||||||
set_reserve(state, total);
|
set_reserve(state, total);
|
||||||
|
|
||||||
if (!check_config_bounds(tmpctx, total, state->feerate_per_kw,
|
if (!check_config_bounds(tmpctx, total,
|
||||||
|
state->feerate_per_kw_commitment,
|
||||||
state->max_to_self_delay,
|
state->max_to_self_delay,
|
||||||
state->min_effective_htlc_capacity,
|
state->min_effective_htlc_capacity,
|
||||||
&state->remoteconf,
|
&state->remoteconf,
|
||||||
@@ -1776,7 +1778,7 @@ static u8 *opener_start(struct state *state, u8 *msg)
|
|||||||
total,
|
total,
|
||||||
our_msats,
|
our_msats,
|
||||||
take(new_fee_states(NULL, LOCAL,
|
take(new_fee_states(NULL, LOCAL,
|
||||||
&state->feerate_per_kw)),
|
&state->feerate_per_kw_commitment)),
|
||||||
&state->localconf,
|
&state->localconf,
|
||||||
&state->remoteconf,
|
&state->remoteconf,
|
||||||
&state->our_points,
|
&state->our_points,
|
||||||
@@ -1927,7 +1929,7 @@ static u8 *opener_start(struct state *state, u8 *msg)
|
|||||||
total,
|
total,
|
||||||
state->opener_funding,
|
state->opener_funding,
|
||||||
channel_flags,
|
channel_flags,
|
||||||
state->feerate_per_kw,
|
state->feerate_per_kw_commitment,
|
||||||
NULL,
|
NULL,
|
||||||
state->localconf.channel_reserve,
|
state->localconf.channel_reserve,
|
||||||
state->upfront_shutdown_script[LOCAL],
|
state->upfront_shutdown_script[LOCAL],
|
||||||
|
|||||||
Reference in New Issue
Block a user