-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Trying to add a new user in pmTree and to check if there are too many users:
match self.merkle_tree.set(new_index, rate_commit) {
Err(e) => {
if matches!(e, ZerokitMerkleTreeError::PmtreeErrorKind(PmtreeErrorKind::TreeError(TreeErrorKind::IndexOutOfBounds))) {
println!("Cannot add more users, merkle tree is full...");
} else {
println!("Other error
}
},
_ => todo!(),
}This is very complicated and rely on PmtreeErrorKind (so this code will fail to compile if we switch to another merkle tree impl).
Metadata
Metadata
Assignees
Labels
No labels