Skip to content

Commit

Permalink
Small fix to the logs that will show the hash properly (#1755)
Browse files Browse the repository at this point in the history
  • Loading branch information
shleikes authored Oct 27, 2024
1 parent 1962ab0 commit ea6e5f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions protocol/rpcconsumer/relay_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ func (rp *RelayProcessor) shouldRetryRelay(resultsCount int, hashErr error, node
// Check hash already exist, if it does, we don't want to retry
if !rp.relayRetriesManager.CheckHashInCache(hash) {
// If we didn't find the hash in the hash map we can retry
utils.LavaFormatTrace("retrying on relay error", utils.LogAttr("retry_number", nodeErrors), utils.LogAttr("hash", hash))
utils.LavaFormatTrace("retrying on relay error", utils.LogAttr("retry_number", nodeErrors), utils.LogAttr("hash", utils.ToHexString(hash)))
go rp.metricsInf.SetNodeErrorAttemptMetric(rp.chainIdAndApiInterfaceGetter.GetChainIdAndApiInterface())
return false
}
utils.LavaFormatTrace("found hash in map wont retry", utils.LogAttr("hash", hash))
utils.LavaFormatTrace("found hash in map wont retry", utils.LogAttr("hash", utils.ToHexString(hash)))
} else {
// We failed enough times. we need to add this to our hash map so we don't waste time on it again.
chainId, apiInterface := rp.chainIdAndApiInterfaceGetter.GetChainIdAndApiInterface()
Expand All @@ -205,7 +205,7 @@ func (rp *RelayProcessor) shouldRetryRelay(resultsCount int, hashErr error, node
utils.LogAttr("params", rp.RelayStateMachine.GetProtocolMessage().GetRPCMessage().GetParams()),
utils.LogAttr("chainId", chainId),
utils.LogAttr("apiInterface", apiInterface),
utils.LogAttr("hash", hash),
utils.LogAttr("hash", utils.ToHexString(hash)),
)
rp.relayRetriesManager.AddHashToCache(hash)
}
Expand Down

0 comments on commit ea6e5f5

Please sign in to comment.