diff --git a/openingd/dualopend.c b/openingd/dualopend.c index 0d85f2e5a..ad8d5420e 100644 --- a/openingd/dualopend.c +++ b/openingd/dualopend.c @@ -1908,7 +1908,7 @@ static void accepter_start(struct state *state, const u8 *oc2_msg) if (!fromwire_open_channel2(oc2_msg, &chain_hash, &state->channel_id, /* Temporary! */ - &state->feerate_per_kw_funding, + &tx_state->feerate_per_kw_funding, &state->feerate_per_kw_commitment, &tx_state->opener_funding, &tx_state->remoteconf.dust_limit, @@ -1955,8 +1955,8 @@ static void accepter_start(struct state *state, const u8 *oc2_msg) &state->their_points.revocation); - /* Save feerate on the tx_state as well */ - tx_state->feerate_per_kw_funding = state->feerate_per_kw_funding; + /* Save feerate on the state as well */ + state->feerate_per_kw_funding = tx_state->feerate_per_kw_funding; /* BOLT #2: * @@ -2021,10 +2021,6 @@ static void accepter_start(struct state *state, const u8 *oc2_msg) &state->upfront_shutdown_script[LOCAL])) 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) tx_state->psbt = create_psbt(tx_state, 0, 0, tx_state->tx_locktime);