| 57 | } |
| 58 | |
| 59 | static uint256 ComputeModifiedMerkleRoot(const CMutableTransaction& cb, const CBlock& block) |
| 60 | { |
| 61 | std::vector<uint256> leaves; |
| 62 | leaves.reserve((block.vtx.size() + 1) & ~1ULL); // capacity rounded up to even |
| 63 | leaves.push_back(cb.GetHash().ToUint256()); |
| 64 | for (size_t s = 1; s < block.vtx.size(); ++s) { |
| 65 | leaves.push_back(block.vtx[s]->GetHash().ToUint256()); |
| 66 | } |
| 67 | return ComputeMerkleRoot(std::move(leaves)); |
| 68 | } |
| 69 | |
| 70 | std::optional<SignetTxs> SignetTxs::Create(const CBlock& block, const CScript& challenge) |
| 71 | { |