Now i am following the bitcoin CLI tutorial to create first 101 blocks, but it only creates 1 block instead of one block.
https://bitcoin.org/en/developer-examples#testing-applications
Here is my chainparams.cpp
/**
* Regression test
*/
class CRegTestParams : public CChainParams {
public:
CRegTestParams() {
strNetworkID = "regtest";
consensus.nSubsidyHalvingInterval = 150;
consensus.BIP16Height = 0; // always enforce P2SH BIP16 on regtest
consensus.BIP34Height = 100000000; // BIP34 has not activated on regtest (far in the future so block v1 are not rejected in tests)
consensus.BIP34Hash = uint256();
consensus.BIP65Height = 1351; // BIP65 activated on regtest (Used in rpc activation tests)
consensus.BIP66Height = 1251; // BIP66 activated on regtest (Used in rpc activation tests)
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
consensus.nPowTargetSpacing = 10 * 60;
consensus.fPowAllowMinDifficultyBlocks = true;
consensus.fPowNoRetargeting = true;
consensus.nRuleChangeActivationThreshold = 108; // 75% for testchains
consensus.nMinerConfirmationWindow = 144; // Faster than normal for regtest (144 instead of 2016)
and in the commanline, it is executing only one block.
./bitcoin-cli -regtest generate 101
[
"179ef1bb855aed3d01324e6eff17ce63773b3ae79a0e123bfdf7f5d11cad0360"
]
and the output (clipped)
./bitcoin-cli -regtest getblockchaininfo
{
"chain": "regtest",
"blocks": 4,
"headers": 4,
"bestblockhash": "179ef1bb855aed3d01324e6eff17ce63773b3ae79a0e123bfdf7f5d11cad0360",
"difficulty": 4.656542373906925e-10,
"mediantime": 1516037681,
"verificationprogress": 1,
"initialblockdownload": false,
"chainwork": "0000000000000000000000000000000000000000000000000000000100010009",
"size_on_disk": 1551,
"pruned": false,
"softforks": [
{
"id": "bip34",
"version": 2,
"reject": {
"status": false
}
What is preventing creating 101 blocks?