<p>Because block 506016 happened ~1 week ago, when you start your node software, it thinks that it is still in the initial block syncing phase because the timestamps are off of real time by a lot. The only way around this is to mine a block now. You can modify the source code to bypass this warning so that you can mine a block.</p>

CC BY-SA 3.0
2018-02-03T03:02:00.347Z
Exactly the answer I was looking for. Instead of modifying code I don't fully understand in a language I don't master, I went for the easy solution to just increased the FORK_BLOCK variable to a value a little bit above the current block. I re-compiled the code and it's syncing the blocks now. I expect the mining pool code will run without complaints. Thanks Andrew.
Eric Dela Cruz
CC BY-SA 3.0
2018-02-02T17:02:36.620Z
2018-02-02T17:02:36.620Z
Ava Chow
<p>I got my own hard fork of bitcoin from forkgen.tech.
The fork has happened after block 506016.</p>

<p>I have 2 nodes running and after syncing up to block 506016, I want to run a pool server.</p>

<p>But the <em>getblocktemplate</em> command keeps returning:</p>

<pre><code>error code: -10
error message:
MyCoin is downloading blocks...
</code></pre>

<p>Also <em>getpeerinfo</em> returns:</p>

<pre><code>"id": 0,
"addr": "xxx.xxx.xxx.xxx:37912",
"addrlocal": "xxx.xxx.xxx.xxx:6703",
"addrbind": "xxx.xxx.xxx.xxx:6703",
"services": "000000000000000d",
"relaytxes": true,
"lastsend": 1517579099,
"lastrecv": 1517579099,
"bytessent": 1783,
"bytesrecv": 1807,
"conntime": 1517578379,
"timeoffset": 0,
"pingtime": 0.001438,
"minping": 0.000366,
"version": 70015,
"subver": "/MyCoin:0.15.0.1/",
"inbound": true,
"addnode": false,
"startingheight": 506016,
"banscore": 0,
"synced_headers": -1,
"synced_blocks": -1,
"inflight": [
],
  "whitelisted": false,
  "bytessent_per_msg": {
  "feefilter": 32,
  "getheaders": 1021,
  "ping": 224,
  "pong": 224,
  "sendcmpct": 66,
  "sendheaders": 24,
  "verack": 24,
  "version": 168
},
  "bytesrecv_per_msg": {
  "feefilter": 32,
  "getaddr": 24,
  "getheaders": 1021,
  "ping": 224,
  "pong": 224,
  "sendcmpct": 66,
  "sendheaders": 24,
  "verack": 24,
  "version": 168
}
</code></pre>

<p>Whereby the values synced_headers and synced_blocks should not be -1. The mining pool software complains about this and the blockTemplate and does not start but keeps on waiting for the synced headers and blocks.</p>

<p>Does anyone know what's going on and how to fix this?
Or what further checks I can do to confirm my fork is running correctly. </p>

<p>I am an experience programmer but have no knowledge of c++ but I do know C# and Javascript.</p>

<p>For reference here is the <em>blockchaininfo</em>:</p>

<pre><code>{
  "chain": "main",
  "blocks": 506016,
  "headers": 506016,
  "bestblockhash":"shortened by OP because this value was too long",
  "difficulty": 2603077300218.593,
  "mediantime": 1516861026,
  "verificationprogress": 1,
  "chainwork": "shortened by OP because this value was too long",
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": true
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "active",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 419328
    },
    "segwit": {
      "status": "active",
      "startTime": 1479168000,
      "timeout": 1510704000,
      "since": 481824
    }
  }
}
</code></pre>

<blockchain.info><blockchain-fork><getblocktemplate>
bitcoin fork getblocktemplate keeps reporting downloading blocks
Eric Dela Cruz
# bitcoin fork getblocktemplate keeps reporting downloading blocks

(Asked by: username_0 on 2018-02-02)

I got my own hard fork of bitcoin from forkgen.tech.
The fork has happened after block 506016.

I have 2 nodes running and after syncing up to block 506016, I want to run a pool server.

But the *getblocktemplate* command keeps returning:

```
error code: -10
error message:
MyCoin is downloading blocks...

```

Also *getpeerinfo* returns:

```
"id": 0,
"addr": "xxx.xxx.xxx.xxx:37912",
"addrlocal": "xxx.xxx.xxx.xxx:6703",
"addrbind": "xxx.xxx.xxx.xxx:6703",
"services": "000000000000000d",
"relaytxes": true,
"lastsend": 1517579099,
"lastrecv": 1517579099,
"bytessent": 1783,
"bytesrecv": 1807,
"conntime": 1517578379,
"timeoffset": 0,
"pingtime": 0.001438,
"minping": 0.000366,
"version": 70015,
"subver": "/MyCoin:0.15.0.1/",
"inbound": true,
"addnode": false,
"startingheight": 506016,
"banscore": 0,
"synced_headers": -1,
"synced_blocks": -1,
"inflight": [
],
  "whitelisted": false,
  "bytessent_per_msg": {
  "feefilter": 32,
  "getheaders": 1021,
  "ping": 224,
  "pong": 224,
  "sendcmpct": 66,
  "sendheaders": 24,
  "verack": 24,
  "version": 168
},
  "bytesrecv_per_msg": {
  "feefilter": 32,
  "getaddr": 24,
  "getheaders": 1021,
  "ping": 224,
  "pong": 224,
  "sendcmpct": 66,
  "sendheaders": 24,
  "verack": 24,
  "version": 168
}

```

Whereby the values synced\_headers and synced\_blocks should not be -1. The mining pool software complains about this and the blockTemplate and does not start but keeps on waiting for the synced headers and blocks.

Does anyone know what's going on and how to fix this?
Or what further checks I can do to confirm my fork is running correctly.

I am an experience programmer but have no knowledge of c++ but I do know C# and Javascript.

For reference here is the *blockchaininfo*:

```
{
  "chain": "main",
  "blocks": 506016,
  "headers": 506016,
  "bestblockhash":"shortened by OP because this value was too long",
  "difficulty": 2603077300218.593,
  "mediantime": 1516861026,
  "verificationprogress": 1,
  "chainwork": "shortened by OP because this value was too long",
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": true
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "active",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 419328
    },
    "segwit": {
      "status": "active",
      "startTime": 1479168000,
      "timeout": 1510704000,
      "since": 481824
    }
  }
}

```

**Tags:** blockchain.info, blockchain-fork, getblocktemplate


---

## 1 answers

### Answer by username_1 on 2018-02-02. Score: 1 | Accepted answer

Because block 506016 happened ~1 week ago, when you start your node software, it thinks that it is still in the initial block syncing phase because the timestamps are off of real time by a lot. The only way around this is to mine a block now. You can modify the source code to bypass this warning so that you can mine a block.

> **Comments:**
> **username_0**: Exactly the answer I was looking for. Instead of modifying code I don't fully understand in a language I don't master, I went for the easy solution to just increased the FORK_BLOCK variable to a value a little bit above the current block. I re-compiled the code and it's syncing the blocks now. I expect the mining pool code will run without complaints. Thanks Andrew.  

---

