<blockquote>
  <p>In my ignorance I'm going to assume it is normal: how do I fix it without having to delete everything and making a new chain?</p>
</blockquote>

<p>You can just comment out or remove the check in <code>getblocktemplate</code> so it won't error there.</p>

<p>You should also be able to bypass this by setting your computer's clock to around the time of the most recent block before you start the software. Once it has started, you can bring your computer's clock back to real time and then mine a block.</p>

CC BY-SA 4.0
2018-09-14T01:35:51.787Z
Thanks. Why does this happens? Does it has something to do with DEFAULT_MAX_TIP_AGE?
bruno-alod
CC BY-SA 4.0
2018-09-14T04:33:06.853Z
It happens because bitcoind (and therefore everything based off of it), uses some metrics to determine whether it has a fuly synced blockchain. One of those is the age of the most recent block (aka the blockchain tip). If it is more than a few hours (2 hours IIRC), then it thinks it is out of sync and thus will not exit the InitialBlockDownload phase where somethings are locked down. `getblocktemplate` is coded to not mine when the blockchain isn't synced as if you could, you could inadvertently cause a fork.
Ava Chow
CC BY-SA 4.0
2018-09-14T05:12:33.717Z
Got it. Thank you Andrew. Flawless explanation.
bruno-alod
CC BY-SA 4.0
2018-09-13T23:56:37.933Z
2018-09-13T23:56:37.933Z
Ava Chow
<p>Yesterday I decided to fork a project, just for fun and to learn more about it. So, I forked a project, I generated my own genesis block, changed timestamps, nounce, keys, reset the min chain work. Everything was fine. Compiled it for Windows and Linux, it worked perfectly. I set up a wallet on a Vultr server, the other one in my own PC, mined a few blocks and then I went to bed.</p>

<p>The Vultr walllet kept running, but mine didn't, I closed it.</p>

<p>When I woke up and opened the wallet, it was trying to download blocks. getblocktemplate basically says it is downloading blocks, but there are no blocks to download. It says "8 hours behind". </p>

<p>I'm not sure if this is supposed to happend.</p>

<p>In my ignorance I'm going to assume it is normal: how do I fix it without having to delete everything and making a new chain?</p>

<p>If it's not normal: What did I do wrong?</p>

<bitcoind><development><blockchain-fork><altcoin-development><project-fork>
Blockchain gets stucked if no blocks are mined
bruno-alod
# Blockchain gets stucked if no blocks are mined

(Asked by: username_0 on 2018-09-13)

Yesterday I decided to fork a project, just for fun and to learn more about it. So, I forked a project, I generated my own genesis block, changed timestamps, nounce, keys, reset the min chain work. Everything was fine. Compiled it for Windows and Linux, it worked perfectly. I set up a wallet on a Vultr server, the other one in my own PC, mined a few blocks and then I went to bed.

The Vultr walllet kept running, but mine didn't, I closed it.

When I woke up and opened the wallet, it was trying to download blocks. getblocktemplate basically says it is downloading blocks, but there are no blocks to download. It says "8 hours behind".

I'm not sure if this is supposed to happend.

In my ignorance I'm going to assume it is normal: how do I fix it without having to delete everything and making a new chain?

If it's not normal: What did I do wrong?

**Tags:** bitcoind, development, blockchain-fork, altcoin-development, project-fork


---

## 1 answers

### Answer by username_1 on 2018-09-13. Score: 0 | Accepted answer

> In my ignorance I'm going to assume it is normal: how do I fix it without having to delete everything and making a new chain?

You can just comment out or remove the check in `getblocktemplate` so it won't error there.

You should also be able to bypass this by setting your computer's clock to around the time of the most recent block before you start the software. Once it has started, you can bring your computer's clock back to real time and then mine a block.

> **Comments:**
> **username_0**: Thanks. Why does this happens? Does it has something to do with DEFAULT_MAX_TIP_AGE?  
> **username_1**: It happens because bitcoind (and therefore everything based off of it), uses some metrics to determine whether it has a fuly synced blockchain. One of those is the age of the most recent block (aka the blockchain tip). If it is more than a few hours (2 hours IIRC), then it thinks it is out of sync and thus will not exit the InitialBlockDownload phase where somethings are locked down. `getblocktemplate` is coded to not mine when the blockchain isn't synced as if you could, you could inadvertently cause a fork.  
> **username_0**: Got it. Thank you Andrew. Flawless explanation.  

---

