Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Relayer from previous Ethereum block #384

Merged
merged 16 commits into from
Jun 1, 2021
Merged
Prev Previous commit
Next Next commit
add code comment
  • Loading branch information
denalimarsh committed Jun 1, 2021
commit 767be45ab420935182261e512c0e80ce9a04f905
1 change: 1 addition & 0 deletions relayer/workers/beefyrelayer/beefy-ethereum-listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func (li *BeefyEthereumListener) Start(ctx context.Context, eg *errgroup.Group,
if err != nil {
return err
}
// Relayer's operator must update the StartBlock config variable to the latest Ethereum block number
if uint64(li.ethereumConfig.StartBlock) < blockNumber {
denalimarsh marked this conversation as resolved.
Show resolved Hide resolved
li.log.Info(fmt.Sprintf("Syncing Relayer from block %d...", li.ethereumConfig.StartBlock))
err := li.pollHistoricEventsAndHeaders(ctx, descendantsUntilFinal)
Expand Down