Replace 'Bitcoin Core' by 'Bitcoin Knots' when logging
MODIFY
WalletWasabi.Backend/Global.cs
WalletWasabi.Backend/Global.cs
@@ -127,18 +127,18 @@ namespace WalletWasabi.Backend
if (blocks != headers)
{
- throw new NotSupportedException("Bitcoin Core is not fully synchronized.");
+ throw new NotSupportedException($"{Constants.BuiltinBitcoinNodeName} is not fully synchronized.");
}
- Logger.LogInfo("Bitcoin Core is fully synchronized.");
+ Logger.LogInfo($"{Constants.BuiltinBitcoinNodeName} is fully synchronized.");
var estimateSmartFeeResponse = await RpcClient.TryEstimateSmartFeeAsync(2, EstimateSmartFeeMode.Conservative, simulateIfRegTest: true, tryOtherFeeRates: true);
if (estimateSmartFeeResponse is null)
{
- throw new NotSupportedException("Bitcoin Core cannot estimate network fees yet.");
+ throw new NotSupportedException($"{Constants.BuiltinBitcoinNodeName} cannot estimate network fees yet.");
}
- Logger.LogInfo("Bitcoin Core fee estimation is working.");
+ Logger.LogInfo($"{Constants.BuiltinBitcoinNodeName} fee estimation is working.");
if (Config.Network == Network.RegTest) // Make sure there's at least 101 block, if not generate it
{
@@ -147,7 +147,7 @@ namespace WalletWasabi.Backend
var generateBlocksResponse = await RpcClient.GenerateAsync(101);
if (generateBlocksResponse is null)
{
- throw new NotSupportedException($"Bitcoin Core cannot generate blocks on the {Network.RegTest}.");
+ throw new NotSupportedException($"{Constants.BuiltinBitcoinNodeName} cannot generate blocks on the {Network.RegTest}.");
}
blockchainInfo = await RpcClient.GetBlockchainInfoAsync();
@@ -162,7 +162,7 @@ namespace WalletWasabi.Backend
}
catch (WebException)
{
- Logger.LogError($"Bitcoin Core is not running, or incorrect RPC credentials, or network is given in the config file: `{Config.FilePath}`.");
+ Logger.LogError($"{Constants.BuiltinBitcoinNodeName} is not running, or incorrect RPC credentials, or network is given in the config file: `{Config.FilePath}`.");
throw;
}
}

MODIFY
WalletWasabi/BitcoinCore/CoreNode.cs
WalletWasabi/BitcoinCore/CoreNode.cs
@@ -171,13 +171,13 @@ namespace WalletWasabi.BitcoinCore
// If it isn't already running, then we run it.
if (await coreNode.RpcClient.TestAsync().ConfigureAwait(false) is null)
{
- Logger.LogInfo("Bitcoin Core is already running.");
+ Logger.LogInfo("A Bitcoin node is already running.");
}
else
{
coreNode.Bridge = new BitcoindRpcProcessBridge(coreNode.RpcClient, coreNode.DataDir, printToConsole: false);
await coreNode.Bridge.StartAsync(cancel).ConfigureAwait(false);
- Logger.LogInfo("Started Bitcoin Core.");
+ Logger.LogInfo($"Started {Constants.BuiltinBitcoinNodeName}.");
}
cancel.ThrowIfCancellationRequested();
@@ -266,10 +266,10 @@ namespace WalletWasabi.BitcoinCore
}
}
- Logger.LogInfo("Did not stop Bitcoin Core. Reason:");
+ Logger.LogInfo("Did not stop the Bitcoin node. Reason:");
if (exThrown is null)
{
- Logger.LogInfo("Bitcoin Core was started externally.");
+ Logger.LogInfo("The Bitcoin node was started externally.");
}
else
{

MODIFY
WalletWasabi/BitcoinCore/Processes/BitcoindRpcProcessBridge.cs
WalletWasabi/BitcoinCore/Processes/BitcoindRpcProcessBridge.cs
@@ -55,7 +55,7 @@ namespace WalletWasabi.BitcoinCore.Processes
else if (latestFailureMessage != ex.Message)
{
latestFailureMessage = ex.Message;
- Logger.LogInfo($"Bitcoin Core is not yet ready... Reason: {latestFailureMessage}");
+ Logger.LogInfo($"{Constants.BuiltinBitcoinNodeName} is not yet ready... Reason: {latestFailureMessage}");
}
if (process is null || process.HasExited)

MODIFY
WalletWasabi/Helpers/Constants.cs
WalletWasabi/Helpers/Constants.cs
@@ -57,6 +57,8 @@ namespace WalletWasabi.Helpers
public const string AlphaNumericCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
public const string CapitalAlphaNumericCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+ public const string BuiltinBitcoinNodeName = "Bitcoin Knots";
+
public static readonly Version ClientVersion = new Version(1, 1, 12, 0);
public static readonly Version HwiVersion = new Version("1.1.2");
public static readonly Version BitcoinCoreVersion = new Version("0.20.0");

MODIFY
WalletWasabi/Helpers/EnvironmentHelpers.cs
WalletWasabi/Helpers/EnvironmentHelpers.cs
@@ -105,7 +105,7 @@ namespace WalletWasabi.Helpers
}
else
{
- throw new DirectoryNotFoundException("Could not find suitable default Bitcoin Core datadir.");
+ throw new DirectoryNotFoundException($"Could not find suitable default {Constants.BuiltinBitcoinNodeName} datadir.");
}
}
else
@@ -119,7 +119,7 @@ namespace WalletWasabi.Helpers
}
else
{
- throw new DirectoryNotFoundException("Could not find suitable default Bitcoin Core datadir.");
+ throw new DirectoryNotFoundException($"Could not find suitable default {Constants.BuiltinBitcoinNodeName} datadir.");
}
}

MODIFY
WalletWasabi/Wallets/P2pBlockProvider.cs
WalletWasabi/Wallets/P2pBlockProvider.cs
@@ -277,7 +277,7 @@ namespace WalletWasabi.Wallets
finally
{
LocalBitcoinCoreNode = null;
- Logger.LogInfo("Local Bitcoin Core node disconnected.");
+ Logger.LogInfo($"Local {Constants.BuiltinBitcoinNodeName} node disconnected.");
}
}
}

Replace 'Bitcoin Core' by 'Bitcoin Knots' when logging