mining difficulty is not changed on regtest

by zono   Last Updated February 11, 2019 07:27 AM

I want to see the automated mining difficulty change on regtest but it did not change even I generated 2016 blocks. How can I see it?

// initial difficulty
$ ./bitcoinA/src/bitcoin-cli -rpcuser=bitcoinrpc -rpcpassword=bitcoinrpcpass -rpcport=16591 -regtest getmininginfo
{
  "blocks": 0,
  "currentblockweight": 0,
  "currentblocktx": 0,
  "difficulty": 4.656542373906925e-10,
  "networkhashps": 0,
  "pooledtx": 0,
  "chain": "regtest",
  "warnings": ""
}

// generate 2016 blocks
$ ./bitcoinA/src/bitcoin-cli -rpcuser=bitcoinrpc -rpcpassword=bitcoinrpcpass -rpcport=16591 -regtest generate 2016

// show the difficulty
$ ./bitcoinA/src/bitcoin-cli -rpcuser=bitcoinrpc -rpcpassword=bitcoinrpcpass -rpcport=16591 -regtest getmininginfo
{
  "blocks": 2016,
  "currentblockweight": 4000,
  "currentblocktx": 0,
  "difficulty": 4.656542373906925e-10,
  "networkhashps": 12,
  "pooledtx": 0,
  "chain": "regtest",
  "warnings": ""
}

// generate 2016 blocks again
$ ./bitcoinA/src/bitcoin-cli -rpcuser=bitcoinrpc -rpcpassword=bitcoinrpcpass -rpcport=16591 -regtest generate 2016

// the difficulty was not changed
$ ./bitcoinA/src/bitcoin-cli -rpcuser=bitcoinrpc -rpcpassword=bitcoinrpcpass -rpcport=16591 -regtest getmininginfo
{
  "blocks": 4032,
  "currentblockweight": 4000,
  "currentblocktx": 0,
  "difficulty": 4.656542373906925e-10,
  "networkhashps": 12,
  "pooledtx": 0,
  "chain": "regtest",
  "warnings": ""
}


Related Questions


Updated February 26, 2019 07:27 AM

Updated August 01, 2017 01:27 AM

Updated August 02, 2017 14:27 PM

Updated August 04, 2017 11:27 AM