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?
Thanks. Why does this happens? Does it has something to do with DEFAULT_MAX_TIP_AGE? – user3084964 – 2018-09-14T01:35:51.787
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.
getblocktemplateis coded to not mine when the blockchain isn't synced as if you could, you could inadvertently cause a fork. – Andrew Chow – 2018-09-14T04:33:06.853Got it. Thank you Andrew. Flawless explanation. – user3084964 – 2018-09-14T05:12:33.717