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
    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
    Mar 14, 2019 at 15:50

1 Answer 1

0

It's almost impossible to mine Testnet BTC with CPU, but there is a generatetoaddress command in Bitcoin Core:

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

Documentation: https://bitcoin.org/en/developer-reference#generatetoaddress

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
    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
    Oct 29, 2021 at 17:25

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.