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

Suggest filter range for oversized getLogs request #239

Merged
merged 4 commits into from
Oct 31, 2024
Merged

Conversation

wanliqun
Copy link
Contributor

@wanliqun wanliqun commented Oct 29, 2024

This change is Reviewable

@wanliqun wanliqun requested a review from boqiu October 29, 2024 09:39
Copy link
Contributor

@boqiu boqiu left a comment

Choose a reason for hiding this comment

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

Reviewed 9 of 9 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @wanliqun)


rpc/handler/cfx_logs.go line 110 at r1 (raw file):

		if blkRange, valid := calculateCfxBlockRange(fnFilter); valid {
			numBlocks := int64(blkRange.To - blkRange.From + 1)

Is it possible that blkRange.To < bklRange.From?

Copy link
Contributor Author

@wanliqun wanliqun left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @boqiu)


rpc/handler/cfx_logs.go line 110 at r1 (raw file):

Previously, boqiu (Bo QIU) wrote…

Is it possible that blkRange.To < bklRange.From?

We actually had a check for that in calculateCfxBlockRange, where the returned boolean variable to indicate whether the block range is valid or not would be false in that case.

Copy link
Contributor

@boqiu boqiu left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @wanliqun)

@wanliqun wanliqun merged commit 5b67d8c into main Oct 31, 2024
1 of 2 checks passed
@wanliqun wanliqun deleted the improve-getLogs branch October 31, 2024 02:40
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