mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 17:47:30 +01:00
peer: don't close due to too low fees if we're already closed.
This fixes half of #59 (the part which crashes). It doesn't fix the fact that we should never be doing this for testnet. Reported-by: Thomas Daede <daede003@umn.edu> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
8949290794
commit
ab11322b39
1 changed files with 2 additions and 1 deletions
|
@ -3035,7 +3035,8 @@ static enum watch_result anchor_depthchange(struct peer *peer,
|
|||
* timely manner (see "Risks With HTLC Timeouts").
|
||||
*/
|
||||
/* FIXME: BOLT should say what to do if it can't! We drop conn. */
|
||||
if (peer->local.commit->cstate->fee_rate < get_feerate(peer->dstate)) {
|
||||
if (!state_is_onchain(peer->state) && !state_is_error(peer->state)
|
||||
&& peer->local.commit->cstate->fee_rate < get_feerate(peer->dstate)) {
|
||||
log_broken(peer->log, "fee rate %"PRIu64" lower than %"PRIu64,
|
||||
peer->local.commit->cstate->fee_rate,
|
||||
get_feerate(peer->dstate));
|
||||
|
|
Loading…
Add table
Reference in a new issue