<p>fixed! The main trouble is time. I set my time in genesis hash +3hrs, i changed my pc time +3hrs and voila! Mining works!</p>

CC BY-SA 3.0
2017-07-18T21:34:21.653Z
2017-07-18T21:34:21.653Z
 IT Tech 
<p>I made a new altcoin based on "INSaNe" <a href="https://github.com/CryptoCoderz/INSN" rel="nofollow noreferrer">https://github.com/CryptoCoderz/INSN</a> </p>

<p>I changed genesis hashes using this code:<br></p>

<pre><code>    if (true  &amp;&amp; (genesis.GetHash() != hashGenesisBlock)) {
                     //This will figure out a valid hash and Nonce if you're
                    // creating a different genesis block:
                        uint256 hashTarget = CBigNum().SetCompact(genesis.nBits).getuint256();
                        while (genesis.GetHash() &gt; hashTarget)
                           {
                               ++genesis.nNonce;
                               if (genesis.nNonce == 0)
                               {
                                   printf("NONCE WRAPPED, incrementing time");
                                   ++genesis.nTime;
                               }
                           }
                    }
            printf("block.GetHash() == %s\n0x", genesis.GetHash().ToString().c_str());
            printf("block.hashMerkleRoot == %s\n", genesis.hashMerkleRoot.ToString().c_str());
            printf("block.nTime = %u \n", genesis.nTime);
            printf("block.nNonce = %u \n", genesis.nNonce);
</code></pre>

<p>So i started coin with two clients on localhost and tried to mine it with cpuminer-multi by tpruvot <a href="https://github.com/tpruvot/cpuminer-multi" rel="nofollow noreferrer">https://github.com/tpruvot/cpuminer-multi</a>, but miner always gives me booo, please help me...</p>

<p>My OS: Kubuntu 16.04</p>

<p>There is no setgenerate or generate function in this cryptocurrency</p>

<pre><code>00:15:45 setgenerate
00:15:45 Method not found (code -32601)
00:16:03 generate
00:16:03 Method not found (code -32601)
</code></pre>

<p>Cpuminer output:</p>

<pre><code>Current block is 1
[2017-07-19 00:16:32] Switching to getwork, gbt version 7
[2017-07-19 00:16:36] CPU #2: 26.28 kH/s
[2017-07-19 00:16:38] accepted: 0/1 (diff 0.000), 26.28 kH/s booooo
</code></pre>

<p>Here is difficulty for mainnet:<br></p>

<pre><code>bnProofOfWorkLimit = CBigNum(~uint256(0) &gt;&gt; 18);
</code></pre>

<p>Here is block time:</p>

<pre><code>static const int64_t BLOCK_SPACING = 5 * 60;
/** Block spacing minimum */
static const int64_t BLOCK_SPACING_MIN = 3.5 * 60;
/** Block spacing maximum */
static const int64_t BLOCK_SPACING_MAX = 7.5 * 60;
</code></pre>

<p>Here is block version:</p>

<pre><code>static const int CURRENT_VERSION=1;
</code></pre>

CC BY-SA 3.0
2018-02-10T09:14:13.860Z
Can you show how you us how/where you changed the time in the code.
Bashish Johanssan
CC BY-SA 4.0
2018-07-24T17:38:31.537Z
How did you actually solve this problem?
Could you please share it? Many thanks,
BRs,
Joe
Joe
<altcoin><altcoin-development><genesis-block>
New altcoin. Cpuminer gives me "booo"
 IT Tech 
# New altcoin. Cpuminer gives me "booo"

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

I made a new altcoin based on "INSaNe" <https://github.com/CryptoCoderz/INSN>

I changed genesis hashes using this code:

```
    if (true  && (genesis.GetHash() != hashGenesisBlock)) {
                     //This will figure out a valid hash and Nonce if you're
                    // creating a different genesis block:
                        uint256 hashTarget = CBigNum().SetCompact(genesis.nBits).getuint256();
                        while (genesis.GetHash() > hashTarget)
                           {
                               ++genesis.nNonce;
                               if (genesis.nNonce == 0)
                               {
                                   printf("NONCE WRAPPED, incrementing time");
                                   ++genesis.nTime;
                               }
                           }
                    }
            printf("block.GetHash() == %s\n0x", genesis.GetHash().ToString().c_str());
            printf("block.hashMerkleRoot == %s\n", genesis.hashMerkleRoot.ToString().c_str());
            printf("block.nTime = %u \n", genesis.nTime);
            printf("block.nNonce = %u \n", genesis.nNonce);

```

So i started coin with two clients on localhost and tried to mine it with cpuminer-multi by tpruvot <https://github.com/tpruvot/cpuminer-multi>, but miner always gives me booo, please help me...

My OS: Kubuntu 16.04

There is no setgenerate or generate function in this cryptocurrency

```
00:15:45 setgenerate
00:15:45 Method not found (code -32601)
00:16:03 generate
00:16:03 Method not found (code -32601)

```

Cpuminer output:

```
Current block is 1
[2017-07-19 00:16:32] Switching to getwork, gbt version 7
[2017-07-19 00:16:36] CPU #2: 26.28 kH/s
[2017-07-19 00:16:38] accepted: 0/1 (diff 0.000), 26.28 kH/s booooo

```

Here is difficulty for mainnet:

```
bnProofOfWorkLimit = CBigNum(~uint256(0) >> 18);

```

Here is block time:

```
static const int64_t BLOCK_SPACING = 5 * 60;
/** Block spacing minimum */
static const int64_t BLOCK_SPACING_MIN = 3.5 * 60;
/** Block spacing maximum */
static const int64_t BLOCK_SPACING_MAX = 7.5 * 60;

```

Here is block version:

```
static const int CURRENT_VERSION=1;

```

**Tags:** altcoin, altcoin-development, genesis-block

> **Comments:**
> **username_1**: Can you show how you us how/where you changed the time in the code.  
> **username_2**: How did you actually solve this problem? Could you please share it? Many thanks, BRs, Joe  

---

## 1 answers

### Answer by username_0 on 2017-07-18. Score: 1

fixed! The main trouble is time. I set my time in genesis hash +3hrs, i changed my pc time +3hrs and voila! Mining works!


---

