fix periphery keys init when config.private_key is not explicitly defined.

This commit is contained in:
mbecker20
2025-10-11 12:00:29 -07:00
parent 3da63395fd
commit 1dc861f538

View File

@@ -20,13 +20,14 @@ pub fn periphery_keys() -> &'static RotatableKeyPair {
if let Some(private_key_spec) = config.private_key.as_deref() {
RotatableKeyPair::from_private_key_spec(private_key_spec)
} else {
RotatableKeyPair::from_private_key_spec(
RotatableKeyPair::from_private_key_spec(&format!(
"file:{}",
config
.root_directory
.join("keys/periphery.key")
.to_str()
.expect("Invalid root directory"),
)
.expect("Invalid root directory")
))
}
.unwrap()
})