| 411 | } |
| 412 | |
| 413 | TestChain100Setup::TestChain100Setup( |
| 414 | const ChainType chain_type, |
| 415 | TestOpts opts) |
| 416 | : TestingSetup{ChainType::REGTEST, opts} |
| 417 | { |
| 418 | constexpr std::array<unsigned char, 32> vchKey = { |
| 419 | {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}}; |
| 420 | coinbaseKey.Set(vchKey.begin(), vchKey.end(), true); |
| 421 | |
| 422 | // Generate a 100-block chain: |
| 423 | this->mineBlocks(COINBASE_MATURITY); |
| 424 | |
| 425 | { |
| 426 | LOCK(::cs_main); |
| 427 | assert( |
| 428 | m_node.chainman->ActiveChain().Tip()->GetBlockHash().ToString() == |
| 429 | "0ee6e270d6594249e548110619f7bd690695beb219b915da4a2e84e2b61ed60f"); |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | void TestChain100Setup::mineBlocks(int num_blocks) |
| 434 | { |
nothing calls this directly
no test coverage detected