1

I have created my crypto currency based on Litecoin 0.13.2. All seem works fine except fact that nodes are not synchronizing.

Debug says:

Ignoring getheaders from peer=x because is in initial block download.

If I compile version 0.8.x and connect to 0.13 there is no problem with blocks data interchange.

I have mined few blocks for testing but stil getting same error, therefore I cannot run my network.

Regards,

1 Answer 1

1

This is happening because your node thinks it is in initial block download.

There are several reasons why that might happen, but I think only two apply here.

  • The chain tip is more than nMaxTipAge seconds old. Try setting the -maxtipage option to a big number, and see if that fixes it.
  • The chain tip has less than nMinimumChainWork (from chainparams.cpp) of work put into it.

Here are the conditions that trigger initial block download:

bool IsInitialBlockDownload()
{
    const CChainParams& chainParams = Params();

    // Once this function has returned false, it must remain false.
    static std::atomic<bool> latchToFalse{false};
    // Optimization: pre-test latch before taking the lock.
    if (latchToFalse.load(std::memory_order_relaxed))
        return false;

    LOCK(cs_main);
    if (latchToFalse.load(std::memory_order_relaxed))
        return false;
    if (fImporting || fReindex)
        return true;
    if (chainActive.Tip() == NULL)
        return true;
    if (chainActive.Tip()->nChainWork < UintToArith256(chainParams.GetConsensus().nMinimumChainWork))
        return true;
    if (chainActive.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge))
        return true;
    latchToFalse.store(true, std::memory_order_relaxed);
    return false;
}
2
  • Not sure if this maybe related to ammount of blocks. I used old code to mine a block, maybe this is an issue too? Do you know the right way how to premine ?
    – Wojtek B
    Aug 1, 2017 at 22:01
  • OK, possible I took right assumption. However still not sychronize. I have generated ~100 blocks and the second node can see it "Received satoshi...block: 100" but then do nothing... Debug file says: getheaders -1 to 000000...
    – Wojtek B
    Aug 2, 2017 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.