mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
peer: don't try to change fees while we're still setting up channel.
And add a FIXME about doing feechanges properly. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
221a96cdeb
commit
13593d4cbf
@ -2968,10 +2968,14 @@ static enum watch_result anchor_depthchange(struct peer *peer,
|
||||
check_htlc_expiry(peer);
|
||||
|
||||
/* If fee rate has changed, fire off update to change it. */
|
||||
if (peer->local.staging_cstate->fee_rate
|
||||
if ((state_is_normal(peer->state) || state_is_shutdown(peer->state))
|
||||
&& peer->local.staging_cstate->fee_rate
|
||||
!= desired_commit_feerate(peer->dstate)) {
|
||||
log_debug(peer->log, "fee rate changed to %"PRIu64,
|
||||
desired_commit_feerate(peer->dstate));
|
||||
/* FIXME: If fee changes back before update, we screw
|
||||
* up and send an empty commit. We need to generate a
|
||||
* real packet here! */
|
||||
remote_changes_pending(peer);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user