1

I want to experiment in the regtest network. But I don't understand how I can get funds to play with. I did:

bitcoind -regtest -daemon

bitcoin-cli -regtest sendtoaddress 2N3V4PeQXoD6TFM9ZvDMX81kzbuNtc5YPW4 1

and get:

error code: -6 error message: Insufficient funds

2

Just generate some blocks.

bitcoin-cli -regtest generate 101

You will have them in your wallet and can use the funds once confirmed. 101 is the number of blocks to create. You can use any integer that's at least 101 as the number of blocks. You cannot use a smaller integer than 101 if you want to test transactions, because of the 100 block maturation time.

  • Thanks! hmm that's odd. Before I tried generating 5 blocks, and it didn't allow me to spend. But with 101 it worked. Do you understand why? – relG Apr 26 '17 at 13:23
  • 3
    @relG: It's because of the 100 block maturation time. – Nate Eldredge Apr 26 '17 at 14:57

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.