-
Notifications
You must be signed in to change notification settings - Fork 885
RequestType::max_responses for LightClientUpdatesByRange #6534
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
RequestType::max_responses for LightClientUpdatesByRange #6534
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
This is also consistent with the spec, with the max size enforced in the handling method:
The response MUST NOT contain more than min(MAX_REQUEST_LIGHT_CLIENT_UPDATES, count) results
@mergify queue |
🛑 The pull request has been removed from the queue
|
Failed due to |
@mergify requeue |
✅ This pull request will be re-embarked automaticallyThe followup |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 40d3423 |
* return the actual number of instances the request requires
Issue Addressed
In case of
RequestType::LightClientUpdatesByRange
,RequestType::max_responses()
returns the number thatLightClientUpdatesByRangeRequest::max_requested()
returns, which is a constant value representing the maximum number of LightClientUpdate instances in a single request. I think it should return the actual number of instances the request requires, instead of the constant value defined in the spec.