NBXplorer: BCH testnet is stuck on CoreSynching
I could swear everything worked fine, but now on 2 machines (with latest NBXplorer version) the NBXplorer server is stuck in the state of CoreSynching, and won’t go to the next step of HandsShake and so on…
Eventually there is a timeout followed by some exceptions, and it goes back to the CoreSynching state.
The testnet core itself is fully synced.
I looked at the IsSynchingCore and it looks like this:
public bool IsSynchingCore(GetBlockchainInfoResponse blockchainInfo)
{
// return false; // @@@
if(blockchainInfo.InitialBlockDownload.HasValue)
return blockchainInfo.InitialBlockDownload.Value;
if(blockchainInfo.MedianTime.HasValue && _Network.DefaultSettings.ChainType != ChainType.Regtest)
{
var time = NBitcoin.Utils.UnixTimeToDateTime(blockchainInfo.MedianTime.Value);
// 5 month diff? probably synching...
if(DateTimeOffset.UtcNow - time > TimeSpan.FromDays(30 * 5))
{
return true;
}
}
return blockchainInfo.Headers - blockchainInfo.Blocks > 6;
}
The return false comment is mine.
if I return false everything goes well and there is a handshake and NBXplorer getting new blocks just fine.
What could cause this and how to fix? is the “probably synching” assumption accurate? there is no such problem with main net.
Can you please assist? Thanks in advanced.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (20 by maintainers)
I just did 😉 I refactored things thanks to the new
NetworkTypethere was some neat stuff to add in the lib. Will update NBXplorer shortly.