Implement backwards compatibility on config files.
MODIFY
WalletWasabi.Backend/Config.cs
WalletWasabi.Backend/Config.cs
@@ -29,7 +29,7 @@ namespace WalletWasabi.Backend
[JsonProperty(PropertyName = "MainNetBitcoinP2pEndPoint")]
[JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultMainNetBintcoinP2pPort)]
- public EndPoint MainNetBitcoinP2PEndPoint { get; internal set; }
+ public EndPoint MainNetBitcoinP2pEndPoint { get; internal set; }
[JsonProperty(PropertyName = "TestNetBitcoinP2pEndPoint")]
[JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultTestNetBintcoinP2pPort)]
@@ -39,75 +39,27 @@ namespace WalletWasabi.Backend
[JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultRegTestBintcoinP2pPort)]
public EndPoint RegTestBitcoinP2pEndPoint { get; internal set; }
- [JsonProperty(PropertyName = "MainNetBitcoinCoreRpcEndPoint")]
- [JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultMainNetBintcoinCoreRpcPort)]
- public EndPoint MainNetBitcoinCoreRpcEndPoint { get; internal set; }
-
- [JsonProperty(PropertyName = "TestNetBitcoinCoreRpcEndPoint")]
- [JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultTestNetBintcoinCoreRpcPort)]
- public EndPoint TestNetBitcoinCoreRpcEndPoint { get; internal set; }
-
- [JsonProperty(PropertyName = "RegTestBitcoinCoreRpcEndPoint")]
- [JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultRegTestBintcoinCoreRpcPort)]
- public EndPoint RegTestBitcoinCoreRpcEndPoint { get; internal set; }
-
- #region Deleteme
-
- [JsonProperty(PropertyName = "MainNetBitcoinCoreHost")]
- public string MainNetBitcoinCoreHost { get; internal set; }
-
- [JsonProperty(PropertyName = "TestNetBitcoinCoreHost")]
- public string TestNetBitcoinCoreHost { get; internal set; }
-
- [JsonProperty(PropertyName = "RegTestBitcoinCoreHost")]
- public string RegTestBitcoinCoreHost { get; internal set; }
-
- [JsonProperty(PropertyName = "MainNetBitcoinCorePort")]
- public int? MainNetBitcoinCorePort { get; internal set; }
-
- [JsonProperty(PropertyName = "TestNetBitcoinCorePort")]
- public int? TestNetBitcoinCorePort { get; internal set; }
-
- [JsonProperty(PropertyName = "RegTestBitcoinCorePort")]
- public int? RegTestBitcoinCorePort { get; internal set; }
-
- #endregion Deleteme
-
private EndPoint _bitcoinCoreEndPoint;
- public EndPoint GetBitcoinCoreEndPoint()
+ public EndPoint GetBitcoinP2pEndPoint()
{
if (_bitcoinCoreEndPoint is null)
- {
- IPAddress ipHost;
- string dnsHost = null;
- int? port = null;
- try
{
if (Network == Network.Main)
{
- port = MainNetBitcoinCorePort;
- dnsHost = MainNetBitcoinCoreHost;
- ipHost = IPAddress.Parse(MainNetBitcoinCoreHost);
+ _bitcoinCoreEndPoint = MainNetBitcoinP2pEndPoint;
}
else if (Network == Network.TestNet)
{
- port = TestNetBitcoinCorePort;
- dnsHost = TestNetBitcoinCoreHost;
- ipHost = IPAddress.Parse(TestNetBitcoinCoreHost);
+ _bitcoinCoreEndPoint = TestNetBitcoinP2pEndPoint;
}
- else // if (Network == Network.RegTest)
+ else if (Network == Network.RegTest)
{
- port = RegTestBitcoinCorePort;
- dnsHost = RegTestBitcoinCoreHost;
- ipHost = IPAddress.Parse(RegTestBitcoinCoreHost);
- }
-
- _bitcoinCoreEndPoint = new IPEndPoint(ipHost, port ?? Network.DefaultPort);
+ _bitcoinCoreEndPoint = RegTestBitcoinP2pEndPoint;
}
- catch
+ else
{
- _bitcoinCoreEndPoint = new DnsEndPoint(dnsHost, port ?? Network.DefaultPort);
+ throw new NotSupportedException("Network not supported.");
}
}
@@ -125,22 +77,16 @@ namespace WalletWasabi.Backend
public Config(Network network,
string bitcoinRpcConnectionString,
- string mainNetBitcoinCoreHost,
- string testNetBitcoinCoreHost,
- string regTestBitcoinCoreHost,
- int? mainNetBitcoinCorePort,
- int? testNetBitcoinCorePort,
- int? regTestBitcoinCorePort)
+ EndPoint mainNetBitcoinP2pEndPoint,
+ EndPoint testNetBitcoinP2pEndPoint,
+ EndPoint regTestBitcoinP2pEndPoint)
{
Network = Guard.NotNull(nameof(network), network);
BitcoinRpcConnectionString = Guard.NotNullOrEmptyOrWhitespace(nameof(bitcoinRpcConnectionString), bitcoinRpcConnectionString);
- MainNetBitcoinCoreHost = Guard.NotNullOrEmptyOrWhitespace(nameof(mainNetBitcoinCoreHost), mainNetBitcoinCoreHost);
- TestNetBitcoinCoreHost = Guard.NotNullOrEmptyOrWhitespace(nameof(testNetBitcoinCoreHost), testNetBitcoinCoreHost);
- RegTestBitcoinCoreHost = Guard.NotNullOrEmptyOrWhitespace(nameof(regTestBitcoinCoreHost), regTestBitcoinCoreHost);
- MainNetBitcoinCorePort = Guard.NotNull(nameof(mainNetBitcoinCorePort), mainNetBitcoinCorePort);
- TestNetBitcoinCorePort = Guard.NotNull(nameof(testNetBitcoinCorePort), testNetBitcoinCorePort);
- RegTestBitcoinCorePort = Guard.NotNull(nameof(regTestBitcoinCorePort), regTestBitcoinCorePort);
+ MainNetBitcoinP2pEndPoint = Guard.NotNull(nameof(mainNetBitcoinP2pEndPoint), mainNetBitcoinP2pEndPoint);
+ TestNetBitcoinP2pEndPoint = Guard.NotNull(nameof(testNetBitcoinP2pEndPoint), testNetBitcoinP2pEndPoint);
+ RegTestBitcoinP2pEndPoint = Guard.NotNull(nameof(regTestBitcoinP2pEndPoint), regTestBitcoinP2pEndPoint);
}
/// <inheritdoc />
@@ -162,12 +108,10 @@ namespace WalletWasabi.Backend
Network = Network.Main;
BitcoinRpcConnectionString = "user:password";
- MainNetBitcoinCoreHost = IPAddress.Loopback.ToString();
- TestNetBitcoinCoreHost = IPAddress.Loopback.ToString();
- RegTestBitcoinCoreHost = IPAddress.Loopback.ToString();
- MainNetBitcoinCorePort = Network.Main.DefaultPort;
- TestNetBitcoinCorePort = Network.TestNet.DefaultPort;
- RegTestBitcoinCorePort = Network.RegTest.DefaultPort;
+ MainNetBitcoinP2pEndPoint = new IPEndPoint(IPAddress.Loopback, Constants.DefaultMainNetBintcoinP2pPort);
+ TestNetBitcoinP2pEndPoint = new IPEndPoint(IPAddress.Loopback, Constants.DefaultTestNetBintcoinP2pPort);
+ RegTestBitcoinP2pEndPoint = new IPEndPoint(IPAddress.Loopback, Constants.DefaultRegTestBintcoinP2pPort);
+
if (!File.Exists(FilePath))
{
Logger.LogInfo<Config>($"{nameof(Config)} file did not exist. Created at path: `{FilePath}`.");
@@ -180,12 +124,14 @@ namespace WalletWasabi.Backend
Network = config.Network ?? Network;
BitcoinRpcConnectionString = config.BitcoinRpcConnectionString ?? BitcoinRpcConnectionString;
- MainNetBitcoinCoreHost = config.MainNetBitcoinCoreHost ?? MainNetBitcoinCoreHost;
- TestNetBitcoinCoreHost = config.TestNetBitcoinCoreHost ?? TestNetBitcoinCoreHost;
- RegTestBitcoinCoreHost = config.RegTestBitcoinCoreHost ?? RegTestBitcoinCoreHost;
- MainNetBitcoinCorePort = config.MainNetBitcoinCorePort ?? MainNetBitcoinCorePort;
- TestNetBitcoinCorePort = config.TestNetBitcoinCorePort ?? TestNetBitcoinCorePort;
- RegTestBitcoinCorePort = config.RegTestBitcoinCorePort ?? RegTestBitcoinCorePort;
+ MainNetBitcoinP2pEndPoint = config.MainNetBitcoinP2pEndPoint ?? MainNetBitcoinP2pEndPoint;
+ TestNetBitcoinP2pEndPoint = config.TestNetBitcoinP2pEndPoint ?? TestNetBitcoinP2pEndPoint;
+ RegTestBitcoinP2pEndPoint = config.RegTestBitcoinP2pEndPoint ?? RegTestBitcoinP2pEndPoint;
+
+ if (TryEnsureBackwardsCompatibility(jsonString))
+ {
+ await ToFileAsync();
+ }
}
await ToFileAsync();
@@ -221,5 +167,57 @@ namespace WalletWasabi.Backend
throw new NotSupportedException($"{nameof(FilePath)} is not set. Use {nameof(SetFilePath)} to set it.");
}
}
+
+ private bool TryEnsureBackwardsCompatibility(string jsonString)
+ {
+ // Before Wasabi 1.1.7
+ EndPoint obsoleteStringToEndPoint(string endPointString, int port = 0)
+ {
+ if (IPAddress.TryParse(endPointString, out IPAddress ipAddress))
+ {
+ return new IPEndPoint(ipAddress, port);
+ }
+
+ return new DnsEndPoint(endPointString, port);
+ };
+
+ var jsObject = JsonConvert.DeserializeObject<JObject>(jsonString);
+ bool saveIt = false;
+
+ if (jsObject.TryGetValue("MainNetBitcoinCoreHost", out JToken jMainNetBitcoinCoreHost))
+ {
+ int port = Constants.DefaultMainNetBintcoinP2pPort;
+ if (jsObject.TryGetValue("MainNetBitcoinCorePort", out JToken jMainNetBitcoinCorePort))
+ {
+ port = int.Parse(jMainNetBitcoinCorePort.ToString());
+ }
+ MainNetBitcoinP2pEndPoint = obsoleteStringToEndPoint(jMainNetBitcoinCoreHost.ToString(), port);
+ saveIt = true;
+ }
+
+ if (jsObject.TryGetValue("TestNetBitcoinCoreHost", out JToken jTestNetBitcoinCoreHost))
+ {
+ int port = Constants.DefaultTestNetBintcoinP2pPort;
+ if (jsObject.TryGetValue("TestNetBitcoinCorePort", out JToken jTestNetBitcoinCorePort))
+ {
+ port = int.Parse(jTestNetBitcoinCorePort.ToString());
+ }
+ TestNetBitcoinP2pEndPoint = obsoleteStringToEndPoint(jTestNetBitcoinCoreHost.ToString(), port);
+ saveIt = true;
+ }
+
+ if (jsObject.TryGetValue("RegTestBitcoinCoreHost", out JToken jRegTestBitcoinCoreHost))
+ {
+ int port = Constants.DefaultRegTestBintcoinP2pPort;
+ if (jsObject.TryGetValue("RegTestBitcoinCorePort", out JToken jRegTestBitcoinCorePort))
+ {
+ port = int.Parse(jRegTestBitcoinCorePort.ToString());
+ }
+ RegTestBitcoinP2pEndPoint = obsoleteStringToEndPoint(jRegTestBitcoinCoreHost.ToString(), port);
+ saveIt = true;
+ }
+
+ return saveIt;
+ }
}
}

MODIFY
WalletWasabi.Backend/Global.cs
WalletWasabi.Backend/Global.cs
@@ -52,7 +52,7 @@ namespace WalletWasabi.Backend
await AssertRpcNodeFullyInitializedAsync();
// Make sure P2P works.
- await InitializeP2pAsync(config.Network, config.GetBitcoinCoreEndPoint());
+ await InitializeP2pAsync(config.Network, config.GetBitcoinP2pEndPoint());
// Initialize index building
var indexBuilderServiceDir = Path.Combine(DataDir, nameof(IndexBuilderService));

MODIFY
WalletWasabi.Gui/Config.cs
WalletWasabi.Gui/Config.cs
@@ -50,7 +50,7 @@ namespace WalletWasabi.Gui
[JsonProperty(PropertyName = "MainNetBitcoinP2pEndPoint")]
[JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultMainNetBintcoinP2pPort)]
- public EndPoint MainNetBitcoinP2PEndPoint { get; internal set; }
+ public EndPoint MainNetBitcoinP2pEndPoint { get; internal set; }
[JsonProperty(PropertyName = "TestNetBitcoinP2pEndPoint")]
[JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultTestNetBintcoinP2pPort)]
@@ -60,34 +60,6 @@ namespace WalletWasabi.Gui
[JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultRegTestBintcoinP2pPort)]
public EndPoint RegTestBitcoinP2pEndPoint { get; internal set; }
- #region Deleteme
-
- [JsonProperty(PropertyName = "TorHost")]
- public string TorHost { get; internal set; }
-
- [JsonProperty(PropertyName = "TorSocks5Port")]
- public int? TorSocks5Port { get; internal set; }
-
- [JsonProperty(PropertyName = "MainNetBitcoinCoreHost")]
- public string MainNetBitcoinCoreHost { get; internal set; }
-
- [JsonProperty(PropertyName = "TestNetBitcoinCoreHost")]
- public string TestNetBitcoinCoreHost { get; internal set; }
-
- [JsonProperty(PropertyName = "RegTestBitcoinCoreHost")]
- public string RegTestBitcoinCoreHost { get; internal set; }
-
- [JsonProperty(PropertyName = "MainNetBitcoinCorePort")]
- public int? MainNetBitcoinCorePort { get; internal set; }
-
- [JsonProperty(PropertyName = "TestNetBitcoinCorePort")]
- public int? TestNetBitcoinCorePort { get; internal set; }
-
- [JsonProperty(PropertyName = "RegTestBitcoinCorePort")]
- public int? RegTestBitcoinCorePort { get; internal set; }
-
- #endregion Deleteme
-
[JsonProperty(PropertyName = "MixUntilAnonymitySet")]
public int? MixUntilAnonymitySet
{
@@ -227,46 +199,31 @@ namespace WalletWasabi.Gui
{
if (_torSocks5EndPoint is null)
{
- var host = IPAddress.Parse(TorHost);
- _torSocks5EndPoint = new IPEndPoint(host, (int)TorSocks5Port);
+ _torSocks5EndPoint = TorSocks5EndPoint as IPEndPoint;
}
return _torSocks5EndPoint;
}
- public EndPoint GetBitcoinCoreEndPoint()
+ public EndPoint GetBitcoinP2pEndPoint()
{
if (_bitcoinCoreEndPoint is null)
- {
- IPAddress ipHost;
- string dnsHost = null;
- int? port = null;
- try
{
if (Network == Network.Main)
{
- port = MainNetBitcoinCorePort;
- dnsHost = MainNetBitcoinCoreHost;
- ipHost = IPAddress.Parse(MainNetBitcoinCoreHost);
+ _bitcoinCoreEndPoint = MainNetBitcoinP2pEndPoint;
}
else if (Network == Network.TestNet)
{
- port = TestNetBitcoinCorePort;
- dnsHost = TestNetBitcoinCoreHost;
- ipHost = IPAddress.Parse(TestNetBitcoinCoreHost);
+ _bitcoinCoreEndPoint = TestNetBitcoinP2pEndPoint;
}
- else // if (Network == Network.RegTest)
+ else if (Network == Network.RegTest)
{
- port = RegTestBitcoinCorePort;
- dnsHost = RegTestBitcoinCoreHost;
- ipHost = IPAddress.Parse(RegTestBitcoinCoreHost);
+ _bitcoinCoreEndPoint = RegTestBitcoinP2pEndPoint;
}
-
- _bitcoinCoreEndPoint = new IPEndPoint(ipHost, port ?? Network.DefaultPort);
- }
- catch
+ else
{
- _bitcoinCoreEndPoint = new DnsEndPoint(dnsHost, port ?? Network.DefaultPort);
+ throw new NotSupportedException("Network not supported.");
}
}
@@ -309,15 +266,11 @@ namespace WalletWasabi.Gui
RegTestBackendUriV3 = "http://localhost:37127/";
UseTor = true;
- TorHost = IPAddress.Loopback.ToString();
- TorSocks5Port = 9050;
+ TorSocks5EndPoint = new IPEndPoint(IPAddress.Loopback, Constants.DefaultTorSocksPort);
- MainNetBitcoinCoreHost = IPAddress.Loopback.ToString();
- TestNetBitcoinCoreHost = IPAddress.Loopback.ToString();
- RegTestBitcoinCoreHost = IPAddress.Loopback.ToString();
- MainNetBitcoinCorePort = Network.Main.DefaultPort;
- TestNetBitcoinCorePort = Network.TestNet.DefaultPort;
- RegTestBitcoinCorePort = Network.RegTest.DefaultPort;
+ MainNetBitcoinP2pEndPoint = new IPEndPoint(IPAddress.Loopback, Constants.DefaultMainNetBintcoinP2pPort);
+ TestNetBitcoinP2pEndPoint = new IPEndPoint(IPAddress.Loopback, Constants.DefaultTestNetBintcoinP2pPort);
+ RegTestBitcoinP2pEndPoint = new IPEndPoint(IPAddress.Loopback, Constants.DefaultRegTestBintcoinP2pPort);
MixUntilAnonymitySet = 50;
PrivacyLevelSome = 2;
@@ -334,7 +287,7 @@ namespace WalletWasabi.Gui
await LoadFileAsync();
}
- ServiceConfiguration = new ServiceConfiguration(MixUntilAnonymitySet.Value, PrivacyLevelSome.Value, PrivacyLevelFine.Value, PrivacyLevelStrong.Value, GetBitcoinCoreEndPoint(), DustThreshold);
+ ServiceConfiguration = new ServiceConfiguration(MixUntilAnonymitySet.Value, PrivacyLevelSome.Value, PrivacyLevelFine.Value, PrivacyLevelStrong.Value, GetBitcoinP2pEndPoint(), DustThreshold);
// Just debug convenience.
_backendUri = GetCurrentBackendUri();
@@ -357,15 +310,11 @@ namespace WalletWasabi.Gui
RegTestBackendUriV3 = config.RegTestBackendUriV3 ?? RegTestBackendUriV3;
UseTor = config.UseTor ?? UseTor;
- TorHost = config.TorHost ?? TorHost;
- TorSocks5Port = config.TorSocks5Port ?? TorSocks5Port;
+ TorSocks5EndPoint = config.TorSocks5EndPoint ?? TorSocks5EndPoint;
- MainNetBitcoinCoreHost = config.MainNetBitcoinCoreHost ?? MainNetBitcoinCoreHost;
- TestNetBitcoinCoreHost = config.TestNetBitcoinCoreHost ?? TestNetBitcoinCoreHost;
- RegTestBitcoinCoreHost = config.RegTestBitcoinCoreHost ?? RegTestBitcoinCoreHost;
- MainNetBitcoinCorePort = config.MainNetBitcoinCorePort ?? MainNetBitcoinCorePort;
- TestNetBitcoinCorePort = config.TestNetBitcoinCorePort ?? TestNetBitcoinCorePort;
- RegTestBitcoinCorePort = config.RegTestBitcoinCorePort ?? RegTestBitcoinCorePort;
+ MainNetBitcoinP2pEndPoint = config.MainNetBitcoinP2pEndPoint ?? MainNetBitcoinP2pEndPoint;
+ TestNetBitcoinP2pEndPoint = config.TestNetBitcoinP2pEndPoint ?? TestNetBitcoinP2pEndPoint;
+ RegTestBitcoinP2pEndPoint = config.RegTestBitcoinP2pEndPoint ?? RegTestBitcoinP2pEndPoint;
MixUntilAnonymitySet = config.MixUntilAnonymitySet ?? MixUntilAnonymitySet;
PrivacyLevelSome = config.PrivacyLevelSome ?? PrivacyLevelSome;
@@ -378,6 +327,11 @@ namespace WalletWasabi.Gui
// Just debug convenience.
_backendUri = GetCurrentBackendUri();
+
+ if (TryEnsureBackwardsCompatibility(jsonString))
+ {
+ await ToFileAsync();
+ }
}
/// <inheritdoc />
@@ -470,5 +424,67 @@ namespace WalletWasabi.Gui
}
return 0;
}
+
+ private bool TryEnsureBackwardsCompatibility(string jsonString)
+ {
+ // Before Wasabi 1.1.7
+ EndPoint obsoleteStringToEndPoint(string endPointString, int port = 0)
+ {
+ if (IPAddress.TryParse(endPointString, out IPAddress ipAddress))
+ {
+ return new IPEndPoint(ipAddress, port);
+ }
+
+ return new DnsEndPoint(endPointString, port);
+ };
+
+ var jsObject = JsonConvert.DeserializeObject<JObject>(jsonString);
+ bool saveIt = false;
+ if (jsObject.TryGetValue("TorHost", out JToken jTorHost))
+ {
+ int port = Constants.DefaultTorSocksPort;
+ if (jsObject.TryGetValue("TorSocks5Port", out JToken jTorSocks5Port))
+ {
+ port = int.Parse(jTorSocks5Port.ToString());
+ }
+ TorSocks5EndPoint = obsoleteStringToEndPoint(jTorHost.ToString(), port);
+ saveIt = true;
+ }
+
+ if (jsObject.TryGetValue("MainNetBitcoinCoreHost", out JToken jMainNetBitcoinCoreHost))
+ {
+ int port = Constants.DefaultMainNetBintcoinP2pPort;
+ if (jsObject.TryGetValue("MainNetBitcoinCorePort", out JToken jMainNetBitcoinCorePort))
+ {
+ port = int.Parse(jMainNetBitcoinCorePort.ToString());
+ }
+ MainNetBitcoinP2pEndPoint = obsoleteStringToEndPoint(jMainNetBitcoinCoreHost.ToString(), port);
+ saveIt = true;
+ }
+
+ if (jsObject.TryGetValue("TestNetBitcoinCoreHost", out JToken jTestNetBitcoinCoreHost))
+ {
+ int port = Constants.DefaultTestNetBintcoinP2pPort;
+ if (jsObject.TryGetValue("TestNetBitcoinCorePort", out JToken jTestNetBitcoinCorePort))
+ {
+ port = int.Parse(jTestNetBitcoinCorePort.ToString());
+ }
+ TestNetBitcoinP2pEndPoint = obsoleteStringToEndPoint(jTestNetBitcoinCoreHost.ToString(), port);
+ saveIt = true;
+ }
+
+ if (jsObject.TryGetValue("RegTestBitcoinCoreHost", out JToken jRegTestBitcoinCoreHost))
+ {
+ int port = Constants.DefaultRegTestBintcoinP2pPort;
+ if (jsObject.TryGetValue("RegTestBitcoinCorePort", out JToken jRegTestBitcoinCorePort))
+ {
+ port = int.Parse(jRegTestBitcoinCorePort.ToString());
+ }
+ RegTestBitcoinP2pEndPoint = obsoleteStringToEndPoint(jRegTestBitcoinCoreHost.ToString(), port);
+ saveIt = true;
+ }
+
+ return saveIt;
+ }
}
}

MODIFY
WalletWasabi.Tests/XunitConfiguration/RegTestFixture.cs
WalletWasabi.Tests/XunitConfiguration/RegTestFixture.cs
@@ -44,7 +44,7 @@ namespace WalletWasabi.Tests.XunitConfiguration
Thread.Sleep(100);
Directory.CreateDirectory(testnetBackendDir);
Thread.Sleep(100);
- var config = new Config(BackendNodeBuilder.Network, connectionString, IPAddress.Loopback.ToString(), IPAddress.Loopback.ToString(), BackendRegTestNode.Endpoint.Address.ToString(), Network.Main.DefaultPort, Network.TestNet.DefaultPort, BackendRegTestNode.Endpoint.Port);
+ var config = new Config(BackendNodeBuilder.Network, connectionString, new IPEndPoint(IPAddress.Loopback, Network.Main.DefaultPort), new IPEndPoint(IPAddress.Loopback, Network.TestNet.DefaultPort), new IPEndPoint(IPAddress.Loopback, Network.RegTest.DefaultPort));
var configFilePath = Path.Combine(testnetBackendDir, "Config.json");
config.SetFilePath(configFilePath);
config.ToFileAsync().GetAwaiter().GetResult();

MODIFY
WalletWasabi/JsonConverters/EndPointJsonConverter.cs
WalletWasabi/JsonConverters/EndPointJsonConverter.cs
@@ -17,9 +17,9 @@ namespace WalletWasabi.JsonConverters
public EndPointJsonConverter(int defaultPort)
{
- if (DefaultPort == 0)
+ if (defaultPort == 0)
{
- throw new ArgumentException("Default port not specified.", nameof(DefaultPort));
+ throw new ArgumentException("Default port not specified.", nameof(defaultPort));
}
DefaultPort = defaultPort;

Implement backwards compatibility on config files.