Regtest does not reflect "Newly Generated Coins" in address balance

(Nhan Le Duc) #1

I tried to run bitcore-node in regtest mode with insight-api and insight-ui.
The bitcore-node.json look like this:

  "network": "regtest",
  "port": 3001,
  "services": [
  "servicesConfig": {
    "bitcoind": {
      "spawn": {
        "datadir": "./data",
        "exec": "/usr/local/lib/node_modules/bitcore/node_modules/bitcore-node/bin/bitcoind"

I could add new block by this command:
./node_modules/bitcore-node/bin/bitcoin-0.12.1/bin/bitcoin-cli -datadir=./data -regtest generate 1

In insight, seem block and transaction data is correct:
(Sorry I am newbie and cannot upload image)
No Inputs (Newly Generated Coins) > mpZrqfn3zRjv8ycXq6UzcwT1pZQTrzqH4V 50 BTC (U)

But in the address (http://localhost:3001/insight/address/mpZrqfn3zRjv8ycXq6UzcwT1pZQTrzqH4V), balance still is zero.

I tried to install “address” service for indexing addresses but it was removed from latest version of bitcore.

Did I miss any configuration?

(Nhan Le Duc) #2

Ah… There is my missing piece:

However, a block must have 100 confirmations before that reward can be spent, so we generate 101 blocks to get access to the coinbase transaction from block #1.