Skip to content

Commit

Permalink
Comment and rename
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Nov 9, 2023
1 parent 34673f7 commit 7bf436c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sdk/src/types/block/unlock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ impl Unlocks {
}
}

fn verify_unlock<'a>(
/// Verifies the consistency of non-multi unlocks.
/// Will error on multi unlocks as they can't be nested.
fn verify_non_multi_unlock<'a>(
unlocks: &'a [Unlock],
unlock: &'a Unlock,
index: u16,
Expand Down Expand Up @@ -183,10 +185,10 @@ fn verify_unlocks<const VERIFY: bool>(unlocks: &[Unlock], _: &()) -> Result<(),
match unlock {
Unlock::Multi(multi) => {
for unlock in multi.unlocks() {
verify_unlock(unlocks, unlock, index, &mut seen_signatures)?
verify_non_multi_unlock(unlocks, unlock, index, &mut seen_signatures)?
}
}
_ => verify_unlock(unlocks, unlock, index, &mut seen_signatures)?,
_ => verify_non_multi_unlock(unlocks, unlock, index, &mut seen_signatures)?,
}
}
}
Expand Down

0 comments on commit 7bf436c

Please sign in to comment.