Skip to content

Commit

Permalink
fix: avoid nil pointer exception on logs if latestBlockHeight is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
agparadiso committed Mar 19, 2024
1 parent 27087ca commit 6ad313f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 6ad313f

Please sign in to comment.