mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-04 14:44:30 +01:00
show block gap if lightning node is not synched
This commit is contained in:
@@ -73,9 +73,10 @@ namespace BTCPayServer.Payments.Lightning
|
||||
throw new Exception($"Lightning node network {info.Network}, but expected is {network.CLightningNetworkName}");
|
||||
}
|
||||
|
||||
if (Math.Abs(info.BlockHeight - (await status).ChainHeight) > 10)
|
||||
var blocksGap = Math.Abs(info.BlockHeight - (await status).ChainHeight);
|
||||
if (blocksGap > 10)
|
||||
{
|
||||
throw new Exception($"The lightning node is not synched");
|
||||
throw new Exception($"The lightning is not synched ({blocksGap} blocks)");
|
||||
}
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user