Skip to content

Commit fa12c2a

Browse files
committed
fix: comments
1 parent cd1e012 commit fa12c2a

File tree

2 files changed

+8
-8
lines changed
  • rust/rbac-registration/src

2 files changed

+8
-8
lines changed

rust/rbac-registration/src/cardano/cip509/cip509.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ impl Cip509 {
337337
}
338338

339339
impl Decode<'_, DecodeContext<'_, '_>> for Cip509 {
340-
#[allow(clippy::too_many_lines)]
341340
fn decode(
342341
d: &mut Decoder,
343342
decode_context: &mut DecodeContext,

rust/rbac-registration/src/registration/cardano/mod.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -548,12 +548,12 @@ impl RegistrationChainInner {
548548
}
549549

550550
// Check that new public keys aren't used by other chains.
551-
let valid_pks = new_chain
551+
new_chain
552552
.validate_public_keys(&report, provider)
553553
.await
554554
.ok()?;
555555

556-
if report.is_problematic() || !valid_pks {
556+
if report.is_problematic() {
557557
return None;
558558
}
559559

@@ -608,13 +608,13 @@ impl RegistrationChainInner {
608608
let new_chain = chain.inner.update_stateless(reg.clone(), signing_pk)?;
609609

610610
// Check that new public keys aren't used by other chains.
611-
let valid_pks = new_chain
611+
new_chain
612612
.validate_public_keys(&report, provider)
613613
.await
614614
.ok()?;
615615

616616
// Return an error if any issues were recorded in the report.
617-
if report.is_problematic() || !valid_pks {
617+
if report.is_problematic() {
618618
return None;
619619
}
620620

@@ -626,13 +626,14 @@ impl RegistrationChainInner {
626626
/// across all Catalyst registrations.
627627
///
628628
/// # Returns
629-
/// Returns a [`Result<HashSet<VerifyingKey>>`] containing all unique public keys
630-
/// extracted from the registration chain if validation passes successfully.
629+
/// Returns `Ok(true)` if all signing keys are unique and validation passes
630+
/// successfully. Returns `Ok(false)` if any key conflict is detected, with the
631+
/// issue recorded in the provided [`ProblemReport`].
631632
///
632633
/// # Errors
633634
/// - Propagates any I/O or provider-level errors encountered while checking key
634635
/// ownership (e.g., database lookup failures).
635-
pub async fn validate_public_keys<Provider>(
636+
async fn validate_public_keys<Provider>(
636637
&self,
637638
report: &ProblemReport,
638639
provider: &Provider,

0 commit comments

Comments
 (0)