Skip to content

Commit 333f3ac

Browse files
committed
fix(cardano-blockchain-types): function name
Signed-off-by: bkioshn <[email protected]>
1 parent f05921d commit 333f3ac

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

rust/cardano-blockchain-types/src/metadata/cip36/key_registration.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ impl Decode<'_, ()> for Cip36KeyRegistration {
193193
err_report.missing_field("Nonce", "Missing required key in CIP36 Key Registration");
194194
}
195195

196-
if err_report.problematic() {
196+
if err_report.is_problematic() {
197197
return Err(decode::Error::message(
198198
serde_json::to_string(&err_report)
199199
.unwrap_or_else(|_| "Failed to serialize ProblemReport".to_string()),
@@ -428,7 +428,7 @@ mod tests {
428428
let err_report = ProblemReport::new("CIP36 Key Registration Decoding");
429429
let address =
430430
decode_payment_addr(&mut decoder, &err_report).expect("cannot decode payment address");
431-
assert!(!err_report.problematic());
431+
assert!(!err_report.is_problematic());
432432
assert_eq!(address.unwrap().to_vec().len(), 57);
433433
}
434434

@@ -442,7 +442,7 @@ mod tests {
442442
let mut decoder = Decoder::new(&hex_data);
443443
let err_report = ProblemReport::new("CIP36 Key Registration Decoding");
444444
let stake_pk = decode_stake_pk(&mut decoder, &err_report).expect("cannot decode stake pk");
445-
assert!(!err_report.problematic());
445+
assert!(!err_report.is_problematic());
446446
assert!(stake_pk.is_some());
447447
}
448448

@@ -459,7 +459,7 @@ mod tests {
459459
let (is_cip36, voting_pk) = decode_voting_key(&mut decoder, &err_report)
460460
.expect("cannot decode voting key")
461461
.unwrap();
462-
assert!(!err_report.problematic());
462+
assert!(!err_report.is_problematic());
463463
assert!(is_cip36.unwrap());
464464
assert_eq!(voting_pk.len(), 1);
465465
}
@@ -477,7 +477,7 @@ mod tests {
477477
let (is_cip36, voting_pk) = decode_voting_key(&mut decoder, &err_report)
478478
.expect("cannot decode voting key")
479479
.unwrap();
480-
assert!(!err_report.problematic());
480+
assert!(!err_report.is_problematic());
481481
assert!(!is_cip36.unwrap());
482482
assert_eq!(voting_pk.len(), 1);
483483
}

rust/cardano-blockchain-types/src/metadata/cip36/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl Cip36 {
101101
is_catalyst_strict,
102102
};
103103

104-
if !validation_report.problematic() {
104+
if !validation_report.is_problematic() {
105105
return Ok(cip36);
106106
}
107107
// If there are validation errors, the CIP36 is invalid

rust/cardano-blockchain-types/src/metadata/cip36/registration_witness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl Decode<'_, ()> for Cip36RegistrationWitness {
5757
})
5858
.ok();
5959

60-
if err_report.problematic() {
60+
if err_report.is_problematic() {
6161
return Err(decode::Error::message(
6262
serde_json::to_string(&err_report)
6363
.unwrap_or_else(|_| "Failed to serialize ProblemReport".to_string()),

rust/cardano-blockchain-types/src/metadata/cip36/validation.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ mod tests {
210210
&validation_report,
211211
);
212212

213-
assert!(!validation_report.problematic());
213+
assert!(!validation_report.is_problematic());
214214
assert_eq!(valid, Some(true));
215215
}
216216

@@ -233,7 +233,7 @@ mod tests {
233233
&validation_report,
234234
);
235235

236-
assert!(validation_report.problematic());
236+
assert!(validation_report.is_problematic());
237237
assert!(serde_json::to_string(&validation_report)
238238
.unwrap_or_else(|_| "Failed to serialize ProblemReport".to_string())
239239
.contains("does not match the network used"));
@@ -251,7 +251,7 @@ mod tests {
251251

252252
let valid = validate_voting_keys(&key_registration, true, &validation_report);
253253

254-
assert!(!validation_report.problematic());
254+
assert!(!validation_report.is_problematic());
255255
assert!(valid);
256256
}
257257

@@ -270,7 +270,7 @@ mod tests {
270270

271271
let valid = validate_voting_keys(&key_registration, true, &validation_report);
272272

273-
assert!(validation_report.problematic());
273+
assert!(validation_report.is_problematic());
274274
assert!(serde_json::to_string(&validation_report)
275275
.unwrap_or_else(|_| "Failed to serialize ProblemReport".to_string())
276276
.contains("Catalyst supports only a single voting key"));
@@ -284,7 +284,7 @@ mod tests {
284284

285285
let valid = validate_purpose(&key_registration, true, &validation_report);
286286

287-
assert!(!validation_report.problematic());
287+
assert!(!validation_report.is_problematic());
288288
assert_eq!(key_registration.purpose, 0);
289289
assert!(valid);
290290
}
@@ -299,7 +299,7 @@ mod tests {
299299

300300
let valid = validate_purpose(&key_registration, true, &validation_report);
301301

302-
assert!(validation_report.problematic());
302+
assert!(validation_report.is_problematic());
303303
assert!(serde_json::to_string(&validation_report)
304304
.unwrap_or_else(|_| "Failed to serialize ProblemReport".to_string())
305305
.contains("unknown purpose"));

0 commit comments

Comments
 (0)