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

Chore/ruanpc/stringfy json num #84

Merged
merged 4 commits into from
Sep 11, 2024
Merged

Conversation

RUAN0007
Copy link
Collaborator

No description provided.

MerkleProof { account, sum_tree_siblings, recursive_tree_siblings, index: 0 };

let json_string = serde_json::to_string(&merkle_proof).unwrap();
println!("JSON: {:?}", json_string);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove println in test

Comment on lines 695 to 697
// );
// println!("Hash: {:?}", hash);
// }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can remove this


// Step 3: Deserialize the JSON string back into an `Account` instance
let deserialized_merkle_proof: MerkleProof = serde_json::from_str(&json_string).unwrap();
assert_eq!(merkle_proof.index, deserialized_merkle_proof.index);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: can check a hash too

@EkamSinghPandher EkamSinghPandher changed the base branch from main to dev September 11, 2024 07:23
Copy link
Collaborator

@EkamSinghPandher EkamSinghPandher left a comment

Choose a reason for hiding this comment

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

LGTM

@RUAN0007 RUAN0007 merged commit 3e5baeb into dev Sep 11, 2024
1 check passed
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