1

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?

0

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.

  • Thanks. Why does this happens? Does it has something to do with DEFAULT_MAX_TIP_AGE? – user3084964 Sep 14 '18 at 1:35
  • 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. – Andrew Chow Sep 14 '18 at 4:33
  • Got it. Thank you Andrew. Flawless explanation. – user3084964 Sep 14 '18 at 5:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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