Skip to content

Commit

Permalink
fixed window skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
olegfomenko committed Dec 18, 2023
1 parent ad36a1d commit e1aa84e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1204,8 +1204,6 @@ github.com/rarimo/broadcaster-svc v1.0.2 h1:ExQcjjWCRP5+POLDlZHrTD1ffUsBH+Dgv5FA
github.com/rarimo/broadcaster-svc v1.0.2/go.mod h1:lYIHy+X4IqQt4eBdtMN/V352H3EV0/gO8G+32SFwUWI=
github.com/rarimo/cosmos-sdk v0.46.7 h1:jU2PiWzc+19SF02cXM0O0puKPeH1C6Q6t2lzJ9s1ejc=
github.com/rarimo/cosmos-sdk v0.46.7/go.mod h1:fqKqz39U5IlEFb4nbQ72951myztsDzFKKDtffYJ63nk=
github.com/rarimo/rarimo-core v1.0.7-0.20231206161857-c1f9b5f9a6f5 h1:/waQ2jEJ/ZUQVhpGTOBBvzxPqB5+yQlfjxOsIlVCEvw=
github.com/rarimo/rarimo-core v1.0.7-0.20231206161857-c1f9b5f9a6f5/go.mod h1:S8d3kZWPFuNsy7llrzUd8Rj92WSCrjSH2YEUD+2A+Ww=
github.com/rarimo/rarimo-core v1.0.7-0.20231208125434-eaf4ddf6c070 h1:gug/AW6noXk5m1yff/1u2CBz8UDSWRonZPhfPAdm04k=
github.com/rarimo/rarimo-core v1.0.7-0.20231208125434-eaf4ddf6c070/go.mod h1:auP3KgxaSwkOUrLWBifjnMbbSQTSBA9Y/gVgq1WU/B4=
github.com/rarimo/saver-grpc-lib v1.0.0 h1:MGUVjYg7unmodYczVsLqlqZNkT4CIgKqdo6aQtL1qdE=
Expand Down
5 changes: 5 additions & 0 deletions internal/services/evm/tree_changed_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ func (l *listener) subscription(ctx context.Context) error {
return fmt.Errorf("failed to define last block: %w", err)
}

if lastBlock == 0 {
// Skipping window
return nil
}

l.log.Infof("Starting subscription from %d to %d", l.fromBlock, lastBlock)
defer l.log.Info("Subscription finished")

Expand Down

0 comments on commit e1aa84e

Please sign in to comment.