Skip to content

Commit

Permalink
adding more info when failing to fetch pairing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ranlavanet committed Jun 2, 2024
1 parent f45ad67 commit 64a0130
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions protocol/statetracker/updaters/state_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ func (csq *ConsumerStateQuery) GetPairing(ctx context.Context, chainID string, l
}
csq.lastChainID = chainID
csq.ResponsesCache.SetWithTTL(PairingRespKey+chainID, pairingResp, 1, DefaultTimeToLiveExpiration)
if len(pairingResp.Providers) == 0 {
utils.LavaFormatError("Chain returned empty provider list, check node connection and consumer subscription status", nil,
utils.LogAttr("chainId", chainID),
utils.LogAttr("epoch", pairingResp.CurrentEpoch),
utils.LogAttr("consumer_address", csq.clientCtx.FromAddress.String()),
)
}
return pairingResp.Providers, pairingResp.CurrentEpoch, pairingResp.BlockOfNextPairing, nil
}

Expand Down

0 comments on commit 64a0130

Please sign in to comment.