mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
dual-funding: rework how funding feerates are passed around
Cleans up some duplication/unnecessary re-assignment of the feerate. Left over from when the feerates used to be min/max/best in open_channel2.
This commit is contained in:
parent
0ae2b0c33d
commit
b366453c6a
@ -1908,7 +1908,7 @@ static void accepter_start(struct state *state, const u8 *oc2_msg)
|
|||||||
|
|
||||||
if (!fromwire_open_channel2(oc2_msg, &chain_hash,
|
if (!fromwire_open_channel2(oc2_msg, &chain_hash,
|
||||||
&state->channel_id, /* Temporary! */
|
&state->channel_id, /* Temporary! */
|
||||||
&state->feerate_per_kw_funding,
|
&tx_state->feerate_per_kw_funding,
|
||||||
&state->feerate_per_kw_commitment,
|
&state->feerate_per_kw_commitment,
|
||||||
&tx_state->opener_funding,
|
&tx_state->opener_funding,
|
||||||
&tx_state->remoteconf.dust_limit,
|
&tx_state->remoteconf.dust_limit,
|
||||||
@ -1955,8 +1955,8 @@ static void accepter_start(struct state *state, const u8 *oc2_msg)
|
|||||||
&state->their_points.revocation);
|
&state->their_points.revocation);
|
||||||
|
|
||||||
|
|
||||||
/* Save feerate on the tx_state as well */
|
/* Save feerate on the state as well */
|
||||||
tx_state->feerate_per_kw_funding = state->feerate_per_kw_funding;
|
state->feerate_per_kw_funding = tx_state->feerate_per_kw_funding;
|
||||||
|
|
||||||
/* BOLT #2:
|
/* BOLT #2:
|
||||||
*
|
*
|
||||||
@ -2021,10 +2021,6 @@ static void accepter_start(struct state *state, const u8 *oc2_msg)
|
|||||||
&state->upfront_shutdown_script[LOCAL]))
|
&state->upfront_shutdown_script[LOCAL]))
|
||||||
master_badmsg(WIRE_DUALOPEND_GOT_OFFER_REPLY, msg);
|
master_badmsg(WIRE_DUALOPEND_GOT_OFFER_REPLY, msg);
|
||||||
|
|
||||||
/* Set the state's feerate per kw funding, also. This is
|
|
||||||
* the original feerate we'll base any increases off of. */
|
|
||||||
state->feerate_per_kw_funding = tx_state->feerate_per_kw_funding;
|
|
||||||
|
|
||||||
if (!tx_state->psbt)
|
if (!tx_state->psbt)
|
||||||
tx_state->psbt = create_psbt(tx_state, 0, 0,
|
tx_state->psbt = create_psbt(tx_state, 0, 0,
|
||||||
tx_state->tx_locktime);
|
tx_state->tx_locktime);
|
||||||
|
Loading…
Reference in New Issue
Block a user