fix sysinfo update when id change, and add debug info for pk change

This commit is contained in:
hzhou
2024-04-01 16:20:36 +08:00
parent 9e7137ce09
commit 7fb2464d84
2 changed files with 8 additions and 5 deletions

View File

@@ -867,6 +867,7 @@ impl Config {
}
let mut config = Config::load_::<Config>("");
if config.key_pair.0.is_empty() {
log::info!("Generated new keypair for id: {}", config.id);
let (pk, sk) = sign::gen_keypair();
let key_pair = (sk.0.to_vec(), pk.0.into());
config.key_pair = key_pair.clone();