| 313 | } |
| 314 | |
| 315 | CBlock TestChain100Setup::CreateAndProcessBlock( |
| 316 | const std::vector<CMutableTransaction>& txns, |
| 317 | const CScript& scriptPubKey, |
| 318 | CChainState* chainstate) |
| 319 | { |
| 320 | if (!chainstate) { |
| 321 | chainstate = &Assert(m_node.chainman)->ActiveChainstate(); |
| 322 | } |
| 323 | |
| 324 | const CChainParams& chainparams = Params(); |
| 325 | const CBlock block = this->CreateBlock(txns, scriptPubKey, *chainstate); |
| 326 | std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(block); |
| 327 | Assert(m_node.chainman)->ProcessNewBlock(chainparams, shared_pblock, true, nullptr); |
| 328 | |
| 329 | return block; |
| 330 | } |
| 331 | |
| 332 | |
| 333 | CMutableTransaction TestChain100Setup::CreateValidMempoolTransaction(CTransactionRef input_transaction, |
no test coverage detected