Fix handling of ignored messages in historian.py

Fixes a bug where gossip messages that are ignored by the historian plugin will trigger an exception being printed.
This commit is contained in:
Peter Sebastian Nordholt
2021-02-04 08:13:01 +01:00
committed by Christian Decker
parent c277f9e10b
commit 63232c0fb2

View File

@@ -161,10 +161,13 @@ class Flusher(Thread):
elif isinstance(msg, gossipd.NodeAnnouncement):
cls = NodeAnnouncement
else:
return;
self.session.merge(cls.from_gossip(msg, raw))
except Exception as e:
print("Exception parsing gossip message:", e)
logging.warn("Exception parsing gossip message:", e)
@plugin.init()