From baeb8b59cffdb9d2b439bcda5d9e10be2ac6a8ef Mon Sep 17 00:00:00 2001 From: Gabriel Paradiso Date: Tue, 19 Mar 2024 21:43:33 +0100 Subject: [PATCH] fix: avoid nil pointer exception on logs if latestBlockHeight is nil (#12488) --- .../gateway/handlers/functions/subscriptions/subscriptions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/services/gateway/handlers/functions/subscriptions/subscriptions.go b/core/services/gateway/handlers/functions/subscriptions/subscriptions.go index 610aaa1d7f1..e90201a31a9 100644 --- a/core/services/gateway/handlers/functions/subscriptions/subscriptions.go +++ b/core/services/gateway/handlers/functions/subscriptions/subscriptions.go @@ -138,7 +138,7 @@ func (s *onchainSubscriptions) queryLoop() { latestBlockHeight, err := s.client.LatestBlockHeight(ctx) if err != nil || latestBlockHeight == nil { - s.lggr.Errorw("Error calling LatestBlockHeight", "err", err, "latestBlockHeight", latestBlockHeight.Int64()) + s.lggr.Errorw("Error calling LatestBlockHeight", "err", err, "latestBlockHeight", latestBlockHeight) return }