diff --git a/rpcserver.go b/rpcserver.go index 96dee318b..6fb050711 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -5080,14 +5080,19 @@ func createRPCOpenChannel(ctx context.Context, r *rpcServer, // being notified of it. outpoint := dbChannel.FundingOutpoint info, err := r.server.chanEventStore.GetChanInfo(outpoint, peer) - switch err { + switch { + // If the store does not know about the peer, we just log it. + case errors.Is(err, chanfitness.ErrPeerNotFound): + rpcsLog.Warnf("peer: %v not found by channel event store", + peer) + // If the store does not know about the channel, we just log it. - case chanfitness.ErrChannelNotFound: - rpcsLog.Infof("channel: %v not found by channel event store", + case errors.Is(err, chanfitness.ErrChannelNotFound): + rpcsLog.Warnf("channel: %v not found by channel event store", outpoint) // If we got our channel info, we further populate the channel. - case nil: + case err == nil: channel.Uptime = int64(info.Uptime.Seconds()) channel.Lifetime = int64(info.Lifetime.Seconds())