I'm searching for a way to mine 60 blocks without the waiting time (or at least significantly reduce the time) on a testnet. Can it be done or will it affect other operations in the blockchain?

2 Answers 2


If you're using a local testnet (that is, you don't need to accept blocks from other peers, nor get peers to accept your blocks), then you can hardcode a fixed difficulty in src/cryptonote_basic/difficulty.cpp, returning a small value in next_difficulty. A value equal to your hash rate will get you a block every 2 minutes on average. A value equal to your hash rate divided by 20 will get you a block every 6 second on average, etc.

  • This is unnecessary. Just used the --fixed-difficulty flag when using --testnet.
    – jtgrassie
    Aug 22, 2018 at 18:04
  • Only works with very recent master.
    – user36303
    Aug 22, 2018 at 18:22
  • If you're doing testnet stuff you are almost always on master no? If you are cloning the repo and making code changes, you're most likely on master too.
    – jtgrassie
    Aug 22, 2018 at 19:14

No code changes needed:

$ monerod --help | grep fixed --fixed-difficulty arg (=0) Fixed difficulty used for testing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.