From cd7ed4c59cc26d391a446ad0e93199e54b991b28 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sun, 28 Jul 2019 16:49:56 +0200 Subject: [PATCH] fix: constraints.feerate -> get_latest_feerate --- electrum/lnworker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/electrum/lnworker.py b/electrum/lnworker.py index 7871a52bf..c77dc56d8 100644 --- a/electrum/lnworker.py +++ b/electrum/lnworker.py @@ -1043,9 +1043,10 @@ class LNWallet(LNWorker): if chan.is_closed(): continue if constants.net is not constants.BitcoinRegtest: - ratio = chan.constraints.feerate / self.current_feerate_per_kw() + chan_feerate = chan.get_latest_feerate(LOCAL) + ratio = chan_feerate / self.current_feerate_per_kw() if ratio < 0.5: - self.logger.warning(f"fee level for channel {bh2u(chan.channel_id)} is {chan.constraints.feerate} sat/kiloweight, " + self.logger.warning(f"fee level for channel {bh2u(chan.channel_id)} is {chan_feerate} sat/kiloweight, " f"current recommended feerate is {self.current_feerate_per_kw()} sat/kiloweight, consider force closing!") if not chan.should_try_to_reestablish_peer(): continue