being VERY explicit about loading coconut keys
This commit is contained in:
@@ -57,14 +57,14 @@ impl<R: RngCore + CryptoRng + Clone> DkgController<R> {
|
||||
&config.storage_paths.decryption_key_path,
|
||||
&config.storage_paths.public_key_with_proof_path,
|
||||
))?;
|
||||
if let Ok(coconut_keypair_value) =
|
||||
nym_pemstore::load_keypair(&nym_pemstore::KeyPairPath::new(
|
||||
&config.storage_paths.secret_key_path,
|
||||
&config.storage_paths.verification_key_path,
|
||||
))
|
||||
{
|
||||
coconut_keypair.set(Some(coconut_keypair_value)).await;
|
||||
}
|
||||
// if let Ok(coconut_keypair_value) =
|
||||
// nym_pemstore::load_keypair(&nym_pemstore::KeyPairPath::new(
|
||||
// &config.storage_paths.secret_key_path,
|
||||
// &config.storage_paths.verification_key_path,
|
||||
// ))
|
||||
// {
|
||||
// coconut_keypair.set(Some(coconut_keypair_value)).await;
|
||||
// }
|
||||
let persistent_state =
|
||||
PersistentState::load_from_file(&config.storage_paths.dkg_persistent_state_path)
|
||||
.unwrap_or_default();
|
||||
|
||||
@@ -80,6 +80,14 @@ async fn start_nym_api_tasks(
|
||||
let network_details = NetworkDetails::new(connected_nyxd.to_string(), nym_network_details);
|
||||
|
||||
let coconut_keypair = coconut::keypair::KeyPair::new();
|
||||
let keys = nym_pemstore::load_keypair(&nym_pemstore::KeyPairPath::new(
|
||||
&config.coconut_signer.storage_paths.secret_key_path,
|
||||
&config.coconut_signer.storage_paths.verification_key_path,
|
||||
))
|
||||
.expect("failed to load coconut keys");
|
||||
|
||||
coconut_keypair.set(Some(keys)).await;
|
||||
info!("set coconut keys");
|
||||
|
||||
// let's build our rocket!
|
||||
let rocket = http::setup_rocket(
|
||||
|
||||
Reference in New Issue
Block a user