feat(rpc): add cancellations param to submit_block rpc#131
Open
PatStiles wants to merge 8 commits intoralexstokes:mainfrom
Open
feat(rpc): add cancellations param to submit_block rpc#131PatStiles wants to merge 8 commits intoralexstokes:mainfrom
PatStiles wants to merge 8 commits intoralexstokes:mainfrom
Conversation
ralexstokes
requested changes
Sep 14, 2023
Owner
ralexstokes
left a comment
There was a problem hiding this comment.
not sure why we went w/ String for type of cancellation signal
ralexstokes
requested changes
Sep 14, 2023
Owner
ralexstokes
left a comment
There was a problem hiding this comment.
moving in the right direction!
| let path = format!("/relay/v1/builder/blocks"); | ||
| let target = self.api.endpoint.join(&path).map_err(ApiError::from)?; | ||
| let mut request = self.api.http.post(target).json(signed_submission); | ||
| if with_cancellations { request = request.query(&[("cancellations", with_cancellations)]) }; |
|
|
||
| async fn handle_submit_bid<R: BlindedBlockRelayer>( | ||
| State(relayer): State<R>, | ||
| Query(with_cancellations): Query<bool>, |
Owner
There was a problem hiding this comment.
following the spec, this will fail
I think you can try Query<usize> but could also just do Query<String> and something like
let with_cancellations = if with_cancellations == "1" { true } else { false };
Owner
|
@PatStiles can you address the linter failures? |
Author
Done! |
ralexstokes
reviewed
Sep 18, 2023
| with_cancellations: bool, | ||
| ) -> Result<(), Error> { | ||
| let path = format!("/relay/v1/builder/blocks"); | ||
| let path = "/relay/v1/builder/blocks".to_string(); |
Owner
There was a problem hiding this comment.
Suggested change
| let path = "/relay/v1/builder/blocks".to_string(); | |
| let path = "/relay/v1/builder/blocks"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #114