From 74c80fa53642addec879cff48ff95d958d5d7bdf Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Tue, 4 Aug 2020 14:16:25 +0900 Subject: [PATCH] Allow RPC access in services when the node is synching (fix #1795) --- BTCPayServer/Controllers/ServerController.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/BTCPayServer/Controllers/ServerController.cs b/BTCPayServer/Controllers/ServerController.cs index fc8b0bf8e..8bb990711 100644 --- a/BTCPayServer/Controllers/ServerController.cs +++ b/BTCPayServer/Controllers/ServerController.cs @@ -572,15 +572,14 @@ namespace BTCPayServer.Controllers [Route("server/services/{serviceName}/{cryptoCode?}")] public async Task Service(string serviceName, string cryptoCode, bool showQR = false, uint? nonce = null) { - if (!string.IsNullOrEmpty(cryptoCode) && !_dashBoard.IsFullySynched(cryptoCode, out _)) + var service = GetService(serviceName, cryptoCode); + if (service == null) + return NotFound(); + if (!string.IsNullOrEmpty(cryptoCode) && !_dashBoard.IsFullySynched(cryptoCode, out _) && service.Type != ExternalServiceTypes.RPC) { TempData[WellKnownTempData.ErrorMessage] = $"{cryptoCode} is not fully synched"; return RedirectToAction(nameof(Services)); } - var service = GetService(serviceName, cryptoCode); - if (service == null) - return NotFound(); - try {