0

I forked bitocin and created a altcoin.

Now I am running a node of it. There are currently 0 blocks because there are no miners. How can I enable mining on bitcoind?

I tried adding gen=1 with config, but it's not mining.

I believe there was a setgenerate true command, but I am not sure how to use it. How can I make my node mine coins?

1

I believe you can still use the generate and generatetoaddress commands to mine a certain number of blocks. setgenerate was removed in version 0.13 because mining with bitcoin core on mainnet is useless and has been for a number of years: https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.13.0.md#removal-of-internal-miner

  • 1
    Interesting, I didn't know this worked outside regtest mode, but the code suggests that it does. (Of course it will be very slow and one might wish to use an external cpu miner instead.) – Nate Eldredge Feb 13 '18 at 3:53
  • @NateEldredge yeah I thought the same, but couldn't find any checks in the code and running it on mainnet didn't throw any errors, so unless someone knows something otherwise, I guess it works :) – MeshCollider Feb 13 '18 at 4:49

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.