-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
MerkleProof { account, sum_tree_siblings, recursive_tree_siblings, index: 0 }; | ||
|
||
let json_string = serde_json::to_string(&merkle_proof).unwrap(); | ||
println!("JSON: {:?}", json_string); |
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.
Remove println in test
// ); | ||
// println!("Hash: {:?}", hash); | ||
// } |
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.
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); |
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.
nit: can check a hash too
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.
LGTM
No description provided.