From b8d08ed17c23d74b7309867cafd128c136555f82 Mon Sep 17 00:00:00 2001 From: Stan Bondi Date: Wed, 23 Mar 2022 17:34:15 +0400 Subject: [PATCH] fix(wallet): ensure that identity sig is stored on startup (#3951) Description --- - adds code to store the identity signature Motivation and Context --- Whenever the node address changes, the identity signature is resigned for the new address. This identity signature should be preserved and reloaded later. Ref #3950 How Has This Been Tested? --- Manually: Checking that identity signature is stored and doesnt change between reboots --- base_layer/wallet/src/wallet.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/base_layer/wallet/src/wallet.rs b/base_layer/wallet/src/wallet.rs index 9a94f2a633..9cb5f0282c 100644 --- a/base_layer/wallet/src/wallet.rs +++ b/base_layer/wallet/src/wallet.rs @@ -266,6 +266,9 @@ where wallet_database .set_node_features(comms.node_identity().features()) .await?; + if let Some(identity_sig) = comms.node_identity().identity_signature_read().as_ref().cloned() { + wallet_database.set_comms_identity_signature(identity_sig).await?; + } Ok(Self { network: config.network,