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

CHIA-1171: Make DID recovery list hash optional #667

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions crates/chia-puzzles/src/puzzles/did.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{singleton::SingletonStruct, CoinProof};
#[clvm(curry)]
pub struct DidArgs<I, M> {
pub inner_puzzle: I,
pub recovery_list_hash: Bytes32,
pub recovery_list_hash: Option<Bytes32>,
pub num_verifications_required: u64,
pub singleton_struct: SingletonStruct,
pub metadata: M,
Expand All @@ -20,7 +20,7 @@ pub struct DidArgs<I, M> {
impl<I, M> DidArgs<I, M> {
pub fn new(
inner_puzzle: I,
recovery_list_hash: Bytes32,
recovery_list_hash: Option<Bytes32>,
num_verifications_required: u64,
singleton_struct: SingletonStruct,
metadata: M,
Expand All @@ -38,7 +38,7 @@ impl<I, M> DidArgs<I, M> {
impl DidArgs<TreeHash, TreeHash> {
pub fn curry_tree_hash(
inner_puzzle: TreeHash,
recovery_list_hash: Bytes32,
recovery_list_hash: Option<Bytes32>,
num_verifications_required: u64,
singleton_struct: SingletonStruct,
metadata: TreeHash,
Expand Down Expand Up @@ -154,13 +154,7 @@ mod tests {
let puzzle = node_from_bytes(a, &DID_INNER_PUZZLE).unwrap();
let curried = CurriedProgram {
program: puzzle,
args: DidArgs::new(
1,
Bytes32::default(),
1,
SingletonStruct::new(Bytes32::default()),
(),
),
args: DidArgs::new(1, None, 1, SingletonStruct::new(Bytes32::default()), ()),
}
.to_clvm(a)
.unwrap();
Expand Down
Loading