lock HdPubKeysLock at tofile
MODIFY
WalletWasabi/KeyManagement/KeyManager.cs
WalletWasabi/KeyManagement/KeyManager.cs
@@ -134,12 +134,15 @@ namespace WalletWasabi.KeyManagement
public void ToFile(string filePath)
{
IoHelpers.EnsureContainingDirectoryExists(filePath);
+ lock (HdPubKeysLock)
+ {
lock (ToFileLock)
{
string jsonString = JsonConvert.SerializeObject(this, Formatting.Indented);
File.WriteAllText(filePath, jsonString, Encoding.UTF8);
}
}
+ }
public static KeyManager FromFile(string filePath)
{

lock HdPubKeysLock at tofile