Skip to content

fix: Receiver blocks stream would not query today - #987

Merged
darunrs merged 4 commits into
mainfrom
fix-decreasing-block-height-bug
Aug 6, 2024
Merged

darunrs merged 4 commits into
mainfrom
fix-decreasing-block-height-bug

Conversation

@darunrs

@darunrs darunrs commented Aug 6, 2024

Copy link
Copy Markdown
Contributor

The current date used to start the receiver blocks backfill would have hour, minute, second, and nanosecond data. This meant when it reached today's date, it may potentially be ahead. This would lead to today not being queried. This PR fixes this by ensuring the current date is at the very start of the day, which guarantees it passes the <= check.

@darunrs
darunrs marked this pull request as ready for review August 6, 2024 03:19
@darunrs
darunrs requested a review from a team August 6, 2024 03:19
@darunrs darunrs changed the title bug: Receiver blocks stream would not query today fix: Receiver blocks stream would not query today Aug 6, 2024
@darunrs

darunrs commented Aug 6, 2024

Copy link
Copy Markdown
Contributor Author

Would like to get this one out to prod, since it can help speed up a lot of indexers. Will merge now and verify it works like expected in dev. Please review after the fact if needed!

@darunrs
darunrs merged commit a95a48f into main Aug 6, 2024
@darunrs
darunrs deleted the fix-decreasing-block-height-bug branch August 6, 2024 17:20
@darunrs darunrs mentioned this pull request Aug 6, 2024
let mut current_date = start_date;
let mut current_date = start_date
.with_hour(0)
.unwrap()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to do this? Can we handle None explicitly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants