edouardparis / lntop

:zap: LN terminal dashboard :bar_chart:
MIT License
181 stars 24 forks source link

Spurious routing events shown after upgrading to lnd 0.16.0-beta.rc1 #107

Open vixxch opened 1 year ago

vixxch commented 1 year ago

After upgrading lnd to version 0.16.0-beta.rc1 spurious events appears on the routing events tab.

ss

I made this quick and dirty workaround:

diff --git a/pubsub/pubsub.go b/pubsub/pubsub.go
index 5364183..1277cfa 100644
--- a/pubsub/pubsub.go
+++ b/pubsub/pubsub.go
@@ -96,7 +96,9 @@ func (p *PubSub) routingUpdates(ctx context.Context, sub chan *events.Event) {
    go func() {
        for hu := range routingUpdates {
            p.logger.Debug("receive htlcUpdate")
-           sub <- events.NewWithData(events.RoutingEventUpdated, hu)
+           if (*hu).OutgoingChannelId != 0 {
+               sub <- events.NewWithData(events.RoutingEventUpdated, hu)
+           }
        }
        p.wg.Done()
    }()
hieblmi commented 4 months ago

Fixing these a little better in this PR: https://github.com/edouardparis/lntop/pull/113