peer: don't worry about feechange if we can't do anything about it.

Triggering a commit will just do nothing anyway (same check at the
top of try_commit).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2016-11-06 14:45:16 +10:30
parent ab11322b39
commit 4855af8ba2

View file

@ -3019,7 +3019,7 @@ 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 (want_feechange(peer)) {
if (want_feechange(peer) && state_can_commit(peer->state)) {
log_debug(peer->log, "fee rate changed to %"PRIu64,
desired_commit_feerate(peer->dstate));
/* FIXME: If fee changes back before update, we screw