implement config modification on the fly
MODIFY
HiddenWallet.ChaumianTumbler/Global.cs
HiddenWallet.ChaumianTumbler/Global.cs
@@ -23,9 +23,7 @@ namespace HiddenWallet.ChaumianTumbler
CoinJoinStorePath = Path.Combine(DataDir, "CoinJoins.json");
UtxoRefereePath = Path.Combine(DataDir, "BannedUtxos.json");
- string configFilePath = Path.Combine(DataDir, "Config.json");
- Config = new Config();
- await Config.LoadOrCreateDefaultFileAsync(configFilePath, CancellationToken.None);
+ await InitializeConfigAsync();
string rsaPath = Path.Combine(DataDir, "RsaKey.json");
if (File.Exists(rsaPath))
@@ -73,6 +71,13 @@ namespace HiddenWallet.ChaumianTumbler
StateMachineJob = StateMachine.StartAsync(StateMachineJobCancel.Token);
}
+ public static async Task InitializeConfigAsync()
+ {
+ string configFilePath = Path.Combine(DataDir, "Config.json");
+ Config = new Config();
+ await Config.LoadOrCreateDefaultFileAsync(configFilePath, CancellationToken.None);
+ }
+
private static async Task AssertRpcNodeFullyInitializedAsync()
{
RPCResponse blockchainInfo = await RpcClient.SendCommandAsync(RPCOperations.getblockchaininfo);

MODIFY
HiddenWallet.ChaumianTumbler/TumblerStateMachine.cs
HiddenWallet.ChaumianTumbler/TumblerStateMachine.cs
@@ -97,6 +97,8 @@ namespace HiddenWallet.ChaumianTumbler
{
case TumblerPhase.InputRegistration:
{
+ await Global.InitializeConfigAsync();
+
RoundId++;
Console.WriteLine($"New Round: {RoundId}");
Alices = new ConcurrentHashSet<Alice>();

implement config modification on the fly