Skip to content

Commit

Permalink
add some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden committed Sep 30, 2024
1 parent c7421bd commit 1e06c93
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release-relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
- release-v1.0.0
- decentralize-relayer-logs
workflow_dispatch:

env:
Expand Down
9 changes: 9 additions & 0 deletions relayer/relays/execution/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ func (r *Relay) waitAndSend(ctx context.Context, ev *contracts.GatewayOutboundMe
var paraNonce uint64
ethNonce := ev.Nonce
waitingPeriod := (ethNonce + r.config.Schedule.TotalRelayerCount - r.config.Schedule.ID) % r.config.Schedule.TotalRelayerCount
log.WithFields(logrus.Fields{
"waitingPeriod": waitingPeriod,
}).Info("waiting period is")

var cnt uint64
for {
Expand All @@ -368,7 +371,13 @@ func (r *Relay) waitAndSend(ctx context.Context, ev *contracts.GatewayOutboundMe
if cnt == waitingPeriod {
break
}
log.WithFields(logrus.Fields{
"seconds": time.Duration(r.config.Schedule.SleepInterval) * time.Second,
}).Info("sleeping")
time.Sleep(time.Duration(r.config.Schedule.SleepInterval) * time.Second)
log.WithFields(logrus.Fields{
"count": cnt,
}).Info("count is now")
cnt++
}
err = r.doSubmit(ctx, ev)
Expand Down

0 comments on commit 1e06c93

Please sign in to comment.