Skip to content

Commit

Permalink
Merge branch 'master' into largeststddenom
Browse files Browse the repository at this point in the history
  • Loading branch information
nopara73 authored May 17, 2023
2 parents 764e1f6 + a8c1f6e commit 3d5c3b9
Show file tree
Hide file tree
Showing 395 changed files with 1,018 additions and 985 deletions.
File renamed without changes.
23 changes: 23 additions & 0 deletions .github/workflows/verify-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Formatting

on:
push:
branches:
pull_request:

jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Restore
run: |
dotnet restore --force --locked-mode
- name: Formatting
run: |
dotnet format --no-restore --verify-no-changes
4 changes: 2 additions & 2 deletions WalletWasabi.Backend/Config.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using NBitcoin;
using Newtonsoft.Json;
using System.ComponentModel;
using System.Net;
using NBitcoin;
using Newtonsoft.Json;
using WalletWasabi.Bases;
using WalletWasabi.Exceptions;
using WalletWasabi.Helpers;
Expand Down
6 changes: 3 additions & 3 deletions WalletWasabi.Backend/Controllers/BatchController.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Microsoft.AspNetCore.Mvc;
using NBitcoin;
using NBitcoin.RPC;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using NBitcoin;
using NBitcoin.RPC;
using WalletWasabi.Backend.Models;
using WalletWasabi.Backend.Models.Responses;
using WalletWasabi.Helpers;
Expand Down
8 changes: 4 additions & 4 deletions WalletWasabi.Backend/Controllers/BlockchainController.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using NBitcoin;
using NBitcoin.RPC;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using NBitcoin;
using NBitcoin.RPC;
using WalletWasabi.Backend.Models;
using WalletWasabi.Backend.Models.Responses;
using WalletWasabi.BitcoinCore.Mempool;
Expand Down
12 changes: 6 additions & 6 deletions WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8619 // Nullability of reference types in value doesn't match target type.

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using NBitcoin;
using NBitcoin.Crypto;
using NBitcoin.RPC;
using Nito.AsyncEx;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.BitcoinCore.Rpc;
using WalletWasabi.CoinJoin.Common.Models;
using WalletWasabi.CoinJoin.Coordinator;
Expand Down
2 changes: 1 addition & 1 deletion WalletWasabi.Backend/Controllers/LegacyController.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

namespace WalletWasabi.Backend.Controllers;

Expand Down
4 changes: 2 additions & 2 deletions WalletWasabi.Backend/Controllers/OffchainController.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using WalletWasabi.Backend.Models;
using WalletWasabi.Helpers;
using WalletWasabi.Interfaces;
Expand Down
2 changes: 1 addition & 1 deletion WalletWasabi.Backend/Controllers/WabiSabiController.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using WalletWasabi.Affiliation;
using WalletWasabi.Backend.Filters;
using WalletWasabi.Cache;
Expand Down
2 changes: 1 addition & 1 deletion WalletWasabi.Backend/Controllers/WasabiController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using WalletWasabi.Helpers;
using WalletWasabi.Legal;

Expand Down
6 changes: 3 additions & 3 deletions WalletWasabi.Backend/Extensions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace WalletWasabi.Backend;

Expand Down
2 changes: 1 addition & 1 deletion WalletWasabi.Backend/Filters/ExceptionTranslateFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using System.Net;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using WalletWasabi.Affiliation;
using WabiSabi.Crypto;
using WalletWasabi.Affiliation;
using WalletWasabi.WabiSabi;
using WalletWasabi.WabiSabi.Backend.Models;
using WalletWasabi.WabiSabi.Models;
Expand Down
2 changes: 1 addition & 1 deletion WalletWasabi.Backend/Global.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using NBitcoin;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using NBitcoin;
using WalletWasabi.BitcoinCore;
using WalletWasabi.BitcoinCore.Mempool;
using WalletWasabi.BitcoinCore.Rpc;
Expand Down
2 changes: 1 addition & 1 deletion WalletWasabi.Backend/Middlewares/HeadMethodMiddleware.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Http;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;

namespace WalletWasabi.Backend.Middlewares;

Expand Down
2 changes: 1 addition & 1 deletion WalletWasabi.Backend/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using System.Threading.Tasks;
using WalletWasabi.Logging;

namespace WalletWasabi.Backend;
Expand Down
6 changes: 3 additions & 3 deletions WalletWasabi.Backend/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Net.Http;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
Expand All @@ -10,9 +13,6 @@
using Microsoft.OpenApi.Models;
using NBitcoin;
using NBitcoin.RPC;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Net.Http;
using WalletWasabi.Affiliation;
using WalletWasabi.Backend.Middlewares;
using WalletWasabi.BitcoinCore.Rpc;
Expand Down
4 changes: 2 additions & 2 deletions WalletWasabi.Daemon/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public Config(PersistentConfig persistentConfig, string[] args)
public bool JsonRpcServerEnabled => GetEffectiveBool(PersistentConfig.JsonRpcServerEnabled, key: "JsonRpcServerEnabled");
public string JsonRpcUser => GetEffectiveString(PersistentConfig.JsonRpcUser, key: "JsonRpcUser");
public string JsonRpcPassword => GetEffectiveString(PersistentConfig.JsonRpcPassword, key: "JsonRpcPassword");
public string[] JsonRpcServerPrefixes => GetEffectiveValue(PersistentConfig.JsonRpcServerPrefixes, x => new [] { x }, key: "JsonRpcServerPrefixes");
public string[] JsonRpcServerPrefixes => GetEffectiveValue(PersistentConfig.JsonRpcServerPrefixes, x => new[] { x }, key: "JsonRpcServerPrefixes");
public Money DustThreshold => GetEffectiveValue(PersistentConfig.DustThreshold, x =>
{
if (Money.TryParse(x, out var money))
Expand All @@ -63,7 +63,7 @@ public Config(PersistentConfig persistentConfig, string[] args)

public bool EnableGpu => GetEffectiveBool(PersistentConfig.EnableGpu, key: "EnableGpu");
public string CoordinatorIdentifier => GetEffectiveString(PersistentConfig.CoordinatorIdentifier, key: "CoordinatorIdentifier");
public ServiceConfiguration ServiceConfiguration => new (GetBitcoinP2pEndPoint(), DustThreshold);
public ServiceConfiguration ServiceConfiguration => new(GetBitcoinP2pEndPoint(), DustThreshold);

private EndPoint GetEffectiveEndPoint(EndPoint valueInConfigFile, string key) =>
GetEffectiveValue(
Expand Down
10 changes: 5 additions & 5 deletions WalletWasabi.Daemon/Global.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
using System;
using System.IO;
using Microsoft.Extensions.Caching.Memory;
using NBitcoin;
using Nito.AsyncEx;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Caching.Memory;
using NBitcoin;
using Nito.AsyncEx;
using WalletWasabi.BitcoinCore;
using WalletWasabi.BitcoinCore.Endpointing;
using WalletWasabi.BitcoinCore.Mempool;
using WalletWasabi.BitcoinCore.Monitoring;
using WalletWasabi.BitcoinP2p;
using WalletWasabi.Blockchain.Analysis.FeesEstimation;
using WalletWasabi.Blockchain.BlockFilters;
using WalletWasabi.Blockchain.Blocks;
using WalletWasabi.Blockchain.Mempool;
using WalletWasabi.Blockchain.TransactionBroadcasting;
Expand All @@ -31,7 +32,6 @@
using WalletWasabi.Wallets;
using WalletWasabi.WebClients.BlockstreamInfo;
using WalletWasabi.WebClients.Wasabi;
using WalletWasabi.Blockchain.BlockFilters;

namespace WalletWasabi.Daemon;

Expand Down Expand Up @@ -118,7 +118,7 @@ public Global(string dataDir, Config config, WalletManager walletManager)
private IndexStore IndexStore { get; }

private HttpClientFactory BuildHttpClientFactory(Func<Uri> backendUriGetter) =>
new (
new(
Config.UseTor ? TorSettings.SocksEndpoint : null,
backendUriGetter);

Expand Down
4 changes: 2 additions & 2 deletions WalletWasabi.Daemon/PersistentConfig.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using NBitcoin;
using Newtonsoft.Json;
using System.ComponentModel;
using System.Net;
using NBitcoin;
using Newtonsoft.Json;
using WalletWasabi.Bases;
using WalletWasabi.Exceptions;
using WalletWasabi.Helpers;
Expand Down
12 changes: 6 additions & 6 deletions WalletWasabi.Daemon/Program.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System;
using WalletWasabi.Helpers;
using WalletWasabi.Logging;
using WalletWasabi.Services;
using WalletWasabi.Services.Terminate;
using WalletWasabi.Wallets;
using System.Net.Sockets;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Net.Sockets;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using NBitcoin;
using WalletWasabi.Helpers;
using WalletWasabi.Logging;
using WalletWasabi.Services;
using WalletWasabi.Services.Terminate;
using WalletWasabi.Wallets;
using LogLevel = WalletWasabi.Logging.LogLevel;

namespace WalletWasabi.Daemon;
Expand Down
2 changes: 1 addition & 1 deletion WalletWasabi.Daemon/Rpc/WasabiJsonRpcService.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using NBitcoin;
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using NBitcoin;
using WalletWasabi.BitcoinP2p;
using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.Keys;
Expand Down
24 changes: 12 additions & 12 deletions WalletWasabi.Fluent.Desktop/Program.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
using System.Collections.ObjectModel;
using System.Diagnostics;
using Avalonia;
using Avalonia.ReactiveUI;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Net.Sockets;
using System.Reactive;
using System.Reactive.Concurrency;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using ReactiveUI;
using System.Linq;
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.OpenGL;
using Avalonia.ReactiveUI;
using Avalonia.Threading;
using ReactiveUI;
using WalletWasabi.Daemon;
using WalletWasabi.Fluent.CrashReport;
using WalletWasabi.Fluent.Desktop.Extensions;
using WalletWasabi.Fluent.Helpers;
using WalletWasabi.Fluent.ViewModels;
using WalletWasabi.Logging;
using WalletWasabi.Models;
using System.Diagnostics.CodeAnalysis;
using WalletWasabi.Fluent.Desktop.Extensions;
using System.Net.Sockets;
using System.Collections.ObjectModel;
using WalletWasabi.Daemon;
using LogLevel = WalletWasabi.Logging.LogLevel;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Threading;

namespace WalletWasabi.Fluent.Desktop;

Expand Down Expand Up @@ -90,7 +90,7 @@ private static void TerminateApplication()
MainViewModel.Instance.StatusIcon.Dispose();
AppLifetimeHelper.Shutdown(withShutdownPrevention: false, restart: false);
});
});
}

private static void LogUnobservedTaskException(object? sender, AggregateException e)
Expand Down
6 changes: 3 additions & 3 deletions WalletWasabi.Fluent.Generators/AnalyzerExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;

namespace WalletWasabi.Fluent.Generators;

Expand Down
8 changes: 4 additions & 4 deletions WalletWasabi.Fluent.Generators/UIContextGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;

namespace WalletWasabi.Fluent.Generators;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
using System.Collections.Immutable;
using System.Linq;

namespace WalletWasabi.Fluent.Generators;

Expand Down
Loading

0 comments on commit 3d5c3b9

Please sign in to comment.