shohu / c0ban

c0ban source tree
MIT License
0 stars 0 forks source link

Can't mining on Testnet #72

Open shohu opened 5 years ago

shohu commented 5 years ago
# /miner/cpuminer-opt/cpuminer -a lyra2REv2 -o http://localhost:13882 -u c0ban -p c0ban --no-getwork --coinbase-addr=XXXX

         **********  cpuminer-opt 3.8.8.1  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AES_NI and AVX2 and SHA extensions.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT

CPU:            Intel(R) Xeon(R) CPU @ 2.20GHz.
SW built on Jun 11 2018 with GCC 5.4.0.
CPU features: SSE2 AES SSE4.2 AVX AVX2.
SW features: SSE2 AES SSE4.2 AVX AVX2.
Algo features: SSE2 AES SSE4.2 AVX2.
Start mining with AES AVX2.

[2018-10-03 08:54:50] 1 miner threads started, using 'lyra2rev2' algorithm.
[2018-10-03 08:54:50] Current block is 32769
[2018-10-03 08:54:50] Long-polling on http://c0band-testnet-0:13882
[2018-10-03 08:54:51] Share submitted.
[2018-10-03 08:54:51] CPU #0: 123.54 kH, 213.83 kH/s
[2018-10-03 08:54:51] Rejected 1/1 (100.0%), 123.54 kH, 213.83 kH/s, 0C
[2018-10-03 08:54:51] reject reason: bad-cb-height
[2018-10-03 08:54:51] API bind to port 4048 failed - trying again in 20sec
shohu commented 5 years ago

This error was occured by following source

static bool ContextualCheckBlock(const CBlock& block, CValidationState& state, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev)
{
 :
 :
    // Enforce rule that the coinbase starts with serialized block height
    if (nHeight >= consensusParams.BIP34Height)
    {
        CScript expect = CScript() << nHeight;
        if (block.vtx[0]->vin[0].scriptSig.size() < expect.size() ||
            !std::equal(expect.begin(), expect.end(), block.vtx[0]->vin[0].scriptSig.begin())) {
            return state.DoS(100, false, REJECT_INVALID, "bad-cb-height", false, "block height mismatch in coinbase");
        }
    }