| 3395 | } |
| 3396 | |
| 3397 | void UpdateUncommittedBlockStructures(CBlock& block, const CBlockIndex* pindexPrev, const Consensus::Params& consensusParams) |
| 3398 | { |
| 3399 | int commitpos = GetWitnessCommitmentIndex(block); |
| 3400 | static const std::vector<unsigned char> nonce(32, 0x00); |
| 3401 | if (commitpos != -1 && IsWitnessEnabled(pindexPrev, consensusParams) && !block.vtx[0]->HasWitness()) { |
| 3402 | CMutableTransaction tx(*block.vtx[0]); |
| 3403 | tx.vin[0].scriptWitness.stack.resize(1); |
| 3404 | tx.vin[0].scriptWitness.stack[0] = nonce; |
| 3405 | block.vtx[0] = MakeTransactionRef(std::move(tx)); |
| 3406 | } |
| 3407 | } |
| 3408 | |
| 3409 | std::vector<unsigned char> GenerateCoinbaseCommitment(CBlock& block, const CBlockIndex* pindexPrev, const Consensus::Params& consensusParams) |
| 3410 | { |
no test coverage detected