Skip to content

Commit 18ea3aa

Browse files
committed
fix: remove txn index from validate
Signed-off-by: bkioshn <[email protected]>
1 parent d0bf563 commit 18ea3aa

File tree

1 file changed

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

1 file changed

+8
-12
lines changed

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ impl RegistrationChainInner {
189189

190190
let mut validation_report = Vec::new();
191191
// Do the CIP509 validation, ensuring the basic validation pass.
192-
if !cip509.validate(txn, tx_idx, &mut validation_report) {
192+
if !cip509.validate(txn, &mut validation_report) {
193193
// Log out the error if any
194194
error!("CIP509 validation failed: {:?}", validation_report);
195195
bail!("CIP509 validation failed, {:?}", validation_report);
@@ -245,7 +245,7 @@ impl RegistrationChainInner {
245245

246246
let mut validation_report = Vec::new();
247247
// Do the CIP509 validation, ensuring the basic validation pass.
248-
if !cip509.validate(txn, tx_idx, &mut validation_report) {
248+
if !cip509.validate(txn, &mut validation_report) {
249249
error!("CIP509 validation failed: {:?}", validation_report);
250250
bail!("CIP509 validation failed, {:?}", validation_report);
251251
}
@@ -478,22 +478,18 @@ fn update_role_data(
478478
// If there is new role singing key, use it, else use the old one
479479
let signing_key = match role_data.role_signing_key {
480480
Some(key) => Some(key),
481-
None => {
482-
match inner.role_data.get(&role_data.role_number) {
483-
Some((_, role_data)) => role_data.signing_key_ref().clone(),
484-
None => None,
485-
}
481+
None => match inner.role_data.get(&role_data.role_number) {
482+
Some((_, role_data)) => role_data.signing_key_ref().clone(),
483+
None => None,
486484
},
487485
};
488486

489487
// If there is new role encryption key, use it, else use the old one
490488
let encryption_key = match role_data.role_encryption_key {
491489
Some(key) => Some(key),
492-
None => {
493-
match inner.role_data.get(&role_data.role_number) {
494-
Some((_, role_data)) => role_data.encryption_ref().clone(),
495-
None => None,
496-
}
490+
None => match inner.role_data.get(&role_data.role_number) {
491+
Some((_, role_data)) => role_data.encryption_ref().clone(),
492+
None => None,
497493
},
498494
};
499495
let payment_key = get_payment_key_from_tx(txn, role_data.payment_key)?;

0 commit comments

Comments
 (0)