Skip to content

Commit

Permalink
Add "new" function to MultisigInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
ImplOfAnImpl committed Sep 19, 2024
1 parent 88fa577 commit b49f73a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions common/src/size_estimation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ pub struct MultisigInfo {
}

impl MultisigInfo {
pub fn new(total_keys: NonZeroUsize, min_required_signatures: NonZeroU8) -> Self {
Self {
total_keys,
min_required_signatures,
}
}

pub fn from_challenge(challenge: &ClassicMultisigChallenge) -> Self {
Self {
total_keys: challenge.public_keys_count_as_non_zero(),
Expand Down

0 comments on commit b49f73a

Please sign in to comment.