Skip to content

Commit

Permalink
rusk-recovery: Fix build CRS from cache
Browse files Browse the repository at this point in the history
  • Loading branch information
xevisalle committed Sep 17, 2024
1 parent eaa57d4 commit 07a276e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rusk-recovery/src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ static PUB_PARAMS: Lazy<PublicParameters> = Lazy::new(|| {
let theme = Theme::default();
info!("{} CRS from cache", theme.action("Fetching"));
match rusk_profile::get_common_reference_string() {
Ok(buff) if rusk_profile::verify_common_reference_string(&buff) => unsafe {
let pp = PublicParameters::from_slice_unchecked(&buff[..]);
Ok(buff) if rusk_profile::verify_common_reference_string(&buff) => {
let pp = PublicParameters::from_slice(&buff[..])
.expect("Creating PublicParameters from slice failed.");
info!("{} CRS", theme.info("Loaded"));
pp
},
}

_ => {
warn!(
Expand Down

0 comments on commit 07a276e

Please sign in to comment.