electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 9e1c4a59e56f0463281bb36fc7fe39482640fe26
parent 2638c818e95af3253a9c780ccf74b2c157333709
Author: ThomasV <thomasv@electrum.org>
Date:   Fri, 27 Nov 2020 09:50:43 +0100

Merge pull request #6787 from bitromortac/fix-6781

lnrater: fix KeyError for unknown node
Diffstat:
Melectrum/lnrater.py | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/electrum/lnrater.py b/electrum/lnrater.py @@ -252,9 +252,10 @@ class LNRater(Logger): if pk not in channel_peers: break - node_infos = self.channel_db.get_node_infos() + node_info = self.channel_db.get_node_infos().get(pk) + alias = node_info.alias if node_info else 'unknown node alias' self.logger.info( - f"node rating for {node_infos[pk].alias}:\n" + f"node rating for {alias}:\n" f"{pformat(self._node_stats[pk])} (score {self._node_ratings[pk]})") return pk, self._node_stats[pk]