1

I need approximately 100 Bitcoin Testnet to run an experiment on the lightning network.

Any suggestion on how to run CPU mining? Should I use cgminer? Make any sense to perform solo mining on testnet?

Currently I am running a full testnet node with bitcoind on a linux environment.

2
  • Maybe you can find a faucet? Here is an older but probably still appropriate answer: bitcoin.stackexchange.com/questions/29791/…
    – Eddie Dunn
    Commented Mar 13, 2019 at 16:35
  • 1
    You will have to wait until the difficulty is reset to 1, and even then, you might not be able to win a block with the flood of other blocks coming in.
    – JBaczuk
    Commented Mar 14, 2019 at 15:50

1 Answer 1

0

It's possible to mine Testnet BTC with CPU (even with the basic generatetoaddress command), because testnet difficulty drops significantly when there are no blocks on the network for 20 minutes:

bitcoin-cli generatetoaddress nblocks "address" ( maxtries )

If you want to continuously mine on Linux, create a bash loop:

while [ 1 ]
do
    bitcoin-cli generatetoaddress 1 "2N5fJkfCv4cF6vsa5QQJnsazBKWNXynn9zp" 10000000
done

Your luck will depend on other miners activity, for example I was able to mine 6 blocks in 2.5 months.

2
  • 'generate' methods are only effective on Regtest, where you can create blocks at will. Testnet works like Mainnet (although with lower difficulty), so you need proper mining equipment to generate a block.
    – FedFranz
    Commented Oct 28, 2021 at 11:00
  • You can mine with this command, like I did, check my testnet BTC address: blockstream.info/testnet/address/… This is possible because the difficulty drops to 1 on testnet if there is no new block after 20 minutes.
    – DaWe
    Commented Oct 29, 2021 at 17:25

Your Answer

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

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