Remove redundant string interpolation
MODIFY
WalletWasabi.Backend/Global.cs
WalletWasabi.Backend/Global.cs
@@ -118,7 +118,7 @@ namespace WalletWasabi.Backend
Logger.LogInfo<RPCClient>("Bitcoin Core is fully synchronized.");
var estimateSmartFeeResponse = await RpcClient.TryEstimateSmartFeeAsync(2, EstimateSmartFeeMode.Conservative, simulateIfRegTest: true);
- if (estimateSmartFeeResponse == null) throw new NotSupportedException($"Bitcoin Core cannot estimate network fees yet.");
+ if (estimateSmartFeeResponse == null) throw new NotSupportedException("Bitcoin Core cannot estimate network fees yet.");
Logger.LogInfo<RPCClient>("Bitcoin Core fee estimation is working.");
if (Config.Network == Network.RegTest) // Make sure there's at least 101 block, if not generate it
@@ -126,7 +126,7 @@ namespace WalletWasabi.Backend
if (blocks < 101)
{
var generateBlocksResponse = await RpcClient.GenerateAsync(101);
- if (generateBlocksResponse == null) throw new NotSupportedException($"Bitcoin Core cannot cannot generate blocks on the RegTest.");
+ if (generateBlocksResponse == null) throw new NotSupportedException("Bitcoin Core cannot cannot generate blocks on the RegTest.");
blockchainInfoRequest = new RPCRequest(RPCOperations.getblockchaininfo, parameters: null);
blockchainInfo = await RpcClient.GetBlockchainInfoAsync();

MODIFY
WalletWasabi/Helpers/HttpMessageHelper.cs
WalletWasabi/Helpers/HttpMessageHelper.cs
@@ -51,7 +51,7 @@ namespace System.Net.Http
{
string header = await ReadCRLFLineAsync(stream, Encoding.ASCII, ctsToken);
- if (header == null) throw new FormatException($"Malformed HTTP message: End of headers must be CRLF.");
+ if (header == null) throw new FormatException("Malformed HTTP message: End of headers must be CRLF.");
if (header == "")
{
// 2 CRLF was read in row so it's the end of the headers
@@ -69,7 +69,7 @@ namespace System.Net.Http
// header field is received or the header section is terminated).
if (char.IsWhiteSpace(header[0]))
{
- throw new FormatException($"Invalid HTTP message: Cannot be whitespace between the start line and the headers.");
+ throw new FormatException("Invalid HTTP message: Cannot be whitespace between the start line and the headers.");
}
firstRead = false;
}

MODIFY
WalletWasabi/Services/CcjClient.cs
WalletWasabi/Services/CcjClient.cs
@@ -91,7 +91,7 @@ namespace WalletWasabi.Services
{
await ProcessStatusAsync();
- Logger.LogInfo<CcjClient>($"CcjClient is successfully initialized.");
+ Logger.LogInfo<CcjClient>("CcjClient is successfully initialized.");
while (IsRunning)
{

MODIFY
WalletWasabi/Services/WalletService.cs
WalletWasabi/Services/WalletService.cs
@@ -436,27 +436,27 @@ namespace WalletWasabi.Services
if (block == null)
{
- Logger.LogInfo<WalletService>($"Disconnected node, because couldn't parse received block.");
+ Logger.LogInfo<WalletService>("Disconnected node, because couldn't parse received block.");
node.DisconnectAsync("Couldn't parse block.");
continue;
}
if (!block.Check())
{
- Logger.LogInfo<WalletService>($"Disconnected node, because block invalid block received.");
+ Logger.LogInfo<WalletService>("Disconnected node, because block invalid block received.");
node.DisconnectAsync("Invalid block received.");
continue;
}
}
catch (TimeoutException)
{
- Logger.LogInfo<WalletService>($"Disconnected node, because block download took too long.");
+ Logger.LogInfo<WalletService>("Disconnected node, because block download took too long.");
node.DisconnectAsync("Block download took too long.");
continue;
}
catch (OperationCanceledException)
{
- Logger.LogInfo<WalletService>($"Disconnected node, because block download took too long.");
+ Logger.LogInfo<WalletService>("Disconnected node, because block download took too long.");
node.DisconnectAsync("Block download took too long.");
continue;
}

Remove redundant string interpolation