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

feat(rpc-builder): test requests params #5267

Merged
merged 5 commits into from
Nov 10, 2023

Conversation

DoTheBestToGetTheBest
Copy link
Contributor

i'm converting this in draft, i'm having some difficulty to understand what i need to do now

if possible to get some help on this please

@DoTheBestToGetTheBest DoTheBestToGetTheBest marked this pull request as draft November 1, 2023 17:25
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

I like this a lot,

smol nit, then we can put this to work to a few more endpoints

fn build(self) -> String {
json!({
"jsonrpc": "2.0",
"id": self.id,
Copy link
Collaborator

Choose a reason for hiding this comment

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

this needs unwrap or default otherwise this can serialize to null, which is invalid rpc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this needs unwrap or default otherwise this can serialize to null, which is invalid rpc

Does the changes looks better?

@mattsse mattsse added A-rpc Related to the RPC implementation C-test A change that impacts how or what we test labels Nov 2, 2023
@DoTheBestToGetTheBest
Copy link
Contributor Author

I like this a lot,

smol nit, then we can put this to work to a few more endpoints

Thank you so much, this is thanks to your advice in the issue #5234

@rkrasiuk
Copy link
Member

rkrasiuk commented Nov 8, 2023

@DoTheBestToGetTheBest test_rpc_builder_basic is still failing, most likely due to key sorting. please, fix it

@rkrasiuk rkrasiuk changed the title feat(rpc-builder) : test requests params feat(rpc-builder): test requests params Nov 8, 2023
@DoTheBestToGetTheBest
Copy link
Contributor Author

@DoTheBestToGetTheBest test_rpc_builder_basic is still failing, most likely due to key sorting. please, fix it

I'm having a bit of trouble debugging this, I can't run cargo test on my computer. But I promise I'll see it again soon!

Comment on lines 77 to 78
"jsonrpc": "2.0",
"id": id,
Copy link
Collaborator

Choose a reason for hiding this comment

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

switch these and test should work!

@DoTheBestToGetTheBest
Copy link
Contributor Author

I found new way to implement build function to basically guarante that the order of data will be as needed.

@mattsse mattsse marked this pull request as ready for review November 10, 2023 16:39
@mattsse mattsse added this pull request to the merge queue Nov 10, 2023
Merged via the queue into paradigmxyz:main with commit 6c4a9cd Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-test A change that impacts how or what we test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants