Skip to content

Commit

Permalink
added debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
simsonraj committed Aug 22, 2023
1 parent 2891e6d commit cf5846b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion integration-tests/testsetups/ocr.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,24 @@ func (o *OCRSoakTest) observeOCREvents() error {
timeout = time.Second * 15
)
for err == nil {
// log.Info().Interface("Filter Query", o.filterQuery).Str("Timeout", timeout.String()).Msg("Retrieving on-chain events")
log.Info().Interface("Filter Query", o.filterQuery).Str("Timeout", timeout.String()).Msg("Retrieving on-chain events")
ctx, cancel := context.WithTimeout(context.Background(), timeout)

latestBlockNum, err := o.chainClient.LatestBlockNumber(ctx)
if err != nil {
log.Warn().
Err(err).
Int64("Last block number", o.filterQuery.ToBlock.Int64()).
Msg("Error getting latest block number")
}
if latestBlockNum > o.filterQuery.FromBlock.Uint64() {
contractEvents, err = o.chainClient.FilterLogs(ctx, o.filterQuery)
if err != nil {
log.Warn().
Err(err).
Int64("Last block number", o.filterQuery.ToBlock.Int64()).
Msg("Cannot get the contract events")
}
o.filterQuery.FromBlock.Add(o.filterQuery.FromBlock, big.NewInt(1))
o.filterQuery.ToBlock.Add(o.filterQuery.ToBlock, big.NewInt(1))
} else {
Expand Down

0 comments on commit cf5846b

Please sign in to comment.