mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Make CBlock::vtx a vector of shared_ptr<CTransaction>
This commit is contained in:
@@ -160,7 +160,7 @@ uint256 BlockMerkleRoot(const CBlock& block, bool* mutated)
|
||||
std::vector<uint256> leaves;
|
||||
leaves.resize(block.vtx.size());
|
||||
for (size_t s = 0; s < block.vtx.size(); s++) {
|
||||
leaves[s] = block.vtx[s].GetHash();
|
||||
leaves[s] = block.vtx[s]->GetHash();
|
||||
}
|
||||
return ComputeMerkleRoot(leaves, mutated);
|
||||
}
|
||||
@@ -171,7 +171,7 @@ uint256 BlockWitnessMerkleRoot(const CBlock& block, bool* mutated)
|
||||
leaves.resize(block.vtx.size());
|
||||
leaves[0].SetNull(); // The witness hash of the coinbase is 0.
|
||||
for (size_t s = 1; s < block.vtx.size(); s++) {
|
||||
leaves[s] = block.vtx[s].GetWitnessHash();
|
||||
leaves[s] = block.vtx[s]->GetWitnessHash();
|
||||
}
|
||||
return ComputeMerkleRoot(leaves, mutated);
|
||||
}
|
||||
@@ -181,7 +181,7 @@ std::vector<uint256> BlockMerkleBranch(const CBlock& block, uint32_t position)
|
||||
std::vector<uint256> leaves;
|
||||
leaves.resize(block.vtx.size());
|
||||
for (size_t s = 0; s < block.vtx.size(); s++) {
|
||||
leaves[s] = block.vtx[s].GetHash();
|
||||
leaves[s] = block.vtx[s]->GetHash();
|
||||
}
|
||||
return ComputeMerkleBranch(leaves, position);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user