Bitcoin

bitcoin cli – Mines a block to the specified address in regtest mode.

When you create a new block, its block reward must first mature for 100 blocks before it can be used. In your case, running it should mark it as immature. getbalances (See additional notes s).

$ bitcoin-cli -regtest -rpcwallet=minerwallet getbalances
> {
    "mine": 
    "trusted": 0.00000000,
    "untrusted_pending": 0.00000000,
    "immature": 50.00000000
  ,
...

This also explains why the balance in “mywallet” shows 89.99977500. After receiving the block reward of 101 blocks, the first block reward expires (50 BTC). Then subtract the 10 BTC you sent to the other address plus a small transaction fee. After that, we create another block. $MINER_ADDRThe second block reward for “mywallet” will mature and 50 BTC will be added to your wallet balance.

Related Articles

Back to top button