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

Add proof verification test #359

Merged
merged 1 commit into from
Nov 20, 2023
Merged

Add proof verification test #359

merged 1 commit into from
Nov 20, 2023

Conversation

richardpringle
Copy link
Contributor

Add a simple proof verification test

_ => return Ok(value_node.into()),
};

Ok(value)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are currently tests that only pass by chance of leaf-nodes not containing paths. This assures that those will always pass

Copy link
Collaborator

Choose a reason for hiding this comment

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

scary

let value = match NodeType::decode(&value_node) {
Ok(NodeType::Branch(branch)) => branch.value().as_ref().map(|v| v.to_vec()),
Ok(NodeType::Leaf(leaf)) => leaf.data().to_vec().into(),
_ => return Ok(value_node.into()),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Weird case with extension nodes here... This will go away when extension nodes go away

@richardpringle richardpringle enabled auto-merge (squash) November 20, 2023 23:06
@richardpringle richardpringle merged commit 03ae1a2 into main Nov 20, 2023
5 checks passed
@richardpringle richardpringle deleted the more-tests branch November 20, 2023 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants