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

Revocable checks #64

Closed
wants to merge 6 commits into from

Conversation

whalelephant
Copy link
Contributor

Closes #42 and updates e2e test framework

@@ -73,6 +73,26 @@ impl RevocationStatusList {
self.revocation_list.get(idx).as_deref().copied()
}

pub fn revoke(&mut self, idx: usize) -> Option<bool> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be good to add some code doc when it returns true / false / none.

Comment on lines +72 to +81
if let Some(at) = p2.requested_attributes.get_mut("attr4_referent") {
at.non_revoked = Some(NonRevocedInterval {
from: Some(10),
to: Some(20),
})
} else {
panic!("Cannot add non_revoke to attri");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can just unwrap here

pub max_cred_num: u32,
}

impl<'a> Mock<'a> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I have never really done any intensive mocking with Rust, but would it not be easier to pull in a dependency for this? I have no issue with keeping this, but we might have a bit less code with a mock dependency.

@whalelephant
Copy link
Contributor Author

Addressed by #102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Support for mixed proof with revocable/non-revocable credentials
3 participants