From 5e8a363db063ab385952ccbbe419b3397c36086f Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 16 Aug 2024 00:55:40 -0400 Subject: [PATCH] Make DID recovery list hash optional --- crates/chia-puzzles/src/puzzles/did.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/crates/chia-puzzles/src/puzzles/did.rs b/crates/chia-puzzles/src/puzzles/did.rs index f900925e8..7238cfe51 100644 --- a/crates/chia-puzzles/src/puzzles/did.rs +++ b/crates/chia-puzzles/src/puzzles/did.rs @@ -11,7 +11,7 @@ use crate::{singleton::SingletonStruct, CoinProof}; #[clvm(curry)] pub struct DidArgs { pub inner_puzzle: I, - pub recovery_list_hash: Bytes32, + pub recovery_list_hash: Option, pub num_verifications_required: u64, pub singleton_struct: SingletonStruct, pub metadata: M, @@ -20,7 +20,7 @@ pub struct DidArgs { impl DidArgs { pub fn new( inner_puzzle: I, - recovery_list_hash: Bytes32, + recovery_list_hash: Option, num_verifications_required: u64, singleton_struct: SingletonStruct, metadata: M, @@ -38,7 +38,7 @@ impl DidArgs { impl DidArgs { pub fn curry_tree_hash( inner_puzzle: TreeHash, - recovery_list_hash: Bytes32, + recovery_list_hash: Option, num_verifications_required: u64, singleton_struct: SingletonStruct, metadata: TreeHash, @@ -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();