mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-24 01:14:20 +01:00
Fix: Test Connection for lightning setup was hidding cause of failure
This commit is contained in:
@@ -112,7 +112,7 @@ namespace BTCPayServer.Controllers
|
|||||||
var handler = _ServiceProvider.GetRequiredService<LightningLikePaymentHandler>();
|
var handler = _ServiceProvider.GetRequiredService<LightningLikePaymentHandler>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var info = await handler.GetNodeInfo(paymentMethod, network, new InvoiceLogs(), Request.IsOnion());
|
var info = await handler.GetNodeInfo(paymentMethod, network, new InvoiceLogs(), Request.IsOnion(), true);
|
||||||
if (!vm.SkipPortTest)
|
if (!vm.SkipPortTest)
|
||||||
{
|
{
|
||||||
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(20));
|
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(20));
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ namespace BTCPayServer.Payments.Lightning
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<NodeInfo[]> GetNodeInfo(LightningSupportedPaymentMethod supportedPaymentMethod, BTCPayNetwork network, InvoiceLogs invoiceLogs, bool? preferOnion = null)
|
public async Task<NodeInfo[]> GetNodeInfo(LightningSupportedPaymentMethod supportedPaymentMethod, BTCPayNetwork network, InvoiceLogs invoiceLogs, bool? preferOnion = null, bool throws=false)
|
||||||
{
|
{
|
||||||
if (!_Dashboard.IsFullySynched(network.CryptoCode, out var summary))
|
if (!_Dashboard.IsFullySynched(network.CryptoCode, out var summary))
|
||||||
throw new PaymentMethodUnavailableException("Full node not available");
|
throw new PaymentMethodUnavailableException("Full node not available");
|
||||||
@@ -166,7 +166,7 @@ namespace BTCPayServer.Payments.Lightning
|
|||||||
return nodeInfo;
|
return nodeInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e) when (!throws)
|
||||||
{
|
{
|
||||||
invoiceLogs.Write($"NodeInfo failed to be fetched: {e.Message}", InvoiceEventData.EventSeverity.Error);
|
invoiceLogs.Write($"NodeInfo failed to be fetched: {e.Message}", InvoiceEventData.EventSeverity.Error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user