<p>This is happening because your node thinks it is in initial block download.</p>

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

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

<hr>

<p>Here are the conditions that trigger initial block download:</p>

<pre><code>bool IsInitialBlockDownload()
{
    const CChainParams&amp; chainParams = Params();

    // Once this function has returned false, it must remain false.
    static std::atomic&lt;bool&gt; 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()-&gt;nChainWork &lt; UintToArith256(chainParams.GetConsensus().nMinimumChainWork))
        return true;
    if (chainActive.Tip()-&gt;GetBlockTime() &lt; (GetTime() - nMaxTipAge))
        return true;
    latchToFalse.store(true, std::memory_order_relaxed);
    return false;
}
</code></pre>

CC BY-SA 3.0
2017-08-01T22:01:51.437Z
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
CC BY-SA 3.0
2017-08-02T18:20:07.977Z
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
CC BY-SA 3.0
2017-07-30T22:02:09.300Z
2017-07-30T22:02:09.300Z
Nick ODell
<p>I have created my crypto currency based on Litecoin 0.13.2.
All seem works fine except fact that nodes are not synchronizing.</p>

<p>Debug says: </p>

<blockquote>
  <p>Ignoring getheaders from peer=x because is in initial block download.</p>
</blockquote>

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

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

<p>Regards,</p>

<litecoin>
Altcoin connecting nodes
Wojtek B
# Altcoin connecting nodes

(Asked by: username_0 on 2017-07-30)

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,

**Tags:** litecoin


---

## 1 answers

### Answer by username_1 on 2017-07-30. Score: 1 | Accepted answer

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;
}

```

> **Comments:**
> **username_0**: 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 ?  
> **username_0**: 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...  

---

