diff --git a/BTCPayServer.Tests/ChangellyTests.cs b/BTCPayServer.Tests/ChangellyTests.cs index 4e92ed3d5..0b8f18419 100644 --- a/BTCPayServer.Tests/ChangellyTests.cs +++ b/BTCPayServer.Tests/ChangellyTests.cs @@ -240,10 +240,8 @@ namespace BTCPayServer.Tests { case 1: return 0.5m; - break; default: return 1.01m; - break; } }; @@ -281,13 +279,17 @@ namespace BTCPayServer.Tests { } +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously public override async Task> GetCurrenciesFull() +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously { GetCurrenciesFullCallCount++; return GetCurrenciesFullResult; } +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously public override async Task GetExchangeAmount(string fromCurrency, +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously string toCurrency, decimal amount) { GetExchangeAmountCallCount++; diff --git a/BTCPayServer.Tests/docker-compose.yml b/BTCPayServer.Tests/docker-compose.yml index 3a6620d8f..7dcf10865 100644 --- a/BTCPayServer.Tests/docker-compose.yml +++ b/BTCPayServer.Tests/docker-compose.yml @@ -65,7 +65,7 @@ services: nbxplorer: - image: nicolasdorier/nbxplorer:1.0.3.3 + image: nicolasdorier/nbxplorer:1.1.0.1 ports: - "32838:32838" expose: diff --git a/BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs b/BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs index 7a55d51d5..f5f1f8d3b 100644 --- a/BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs +++ b/BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs @@ -39,8 +39,6 @@ namespace BTCPayServer.Services.Fees ExplorerClient _ExplorerClient; public async Task GetFeeRateAsync() { - if (!_ExplorerClient.Network.SupportEstimatesSmartFee) - return _Factory.Fallback; try { return (await _ExplorerClient.GetFeeRateAsync(_Factory.BlockTarget).ConfigureAwait(false)).FeeRate; diff --git a/BTCPayServer/Services/Invoices/InvoiceRepository.cs b/BTCPayServer/Services/Invoices/InvoiceRepository.cs index 3a68bf032..55ccbf95c 100644 --- a/BTCPayServer/Services/Invoices/InvoiceRepository.cs +++ b/BTCPayServer/Services/Invoices/InvoiceRepository.cs @@ -40,7 +40,13 @@ namespace BTCPayServer.Services.Invoices private CustomThreadPool _IndexerThread; public InvoiceRepository(ApplicationDbContextFactory contextFactory, string dbreezePath) { - _Engine = new DBreezeEngine(dbreezePath); + int retryCount = 0; + retry: + try + { + _Engine = new DBreezeEngine(dbreezePath); + } + catch when (retryCount++ < 5) { goto retry; } _IndexerThread = new CustomThreadPool(1, "Invoice Indexer"); _ContextFactory = contextFactory; }