rpcserver+itest: skip err from FlapCount

We need to make sure the `ListPeers` to be robust against errors from
the `FlapCount` so this RPC won't fail due to no flap count info. Also
updated the itest to check this field.
This commit is contained in:
yyforyongyu committed 2025-09-18 22:29:40 +08:00
1 parent e50ecac2f2
commit 2d59976e16
2 files changed
+16 -1

No files matched your search

+5 -1
View File
@@ -3561,8 +3561,12 @@ func (r *rpcServer) ListPeers(ctx context.Context,
flap, ts, err := r.server.chanEventStore.FlapCount(
vertex,
)
// Log the error if we cannot get the flap count instead
// of failing this RPC call.
if err != nil {
return nil, err
rpcsLog.Debugf("Failed to get flap count for "+
"peer %v", vertex)
}
// If our timestamp is non-nil, we have values for our