mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 06:21:44 +01:00
show block gap if lightning node is not synched
This commit is contained in:
parent
030cb09af8
commit
346cdf2431
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue