mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 11:13:02 +02:00
refactor: Convert remaining instances from uint256 to Txid
These remaining miscellaneous changes were identified by commenting out the `operator const uint256&` conversion and the `Compare(const uint256&)` method from `transaction_identifier.h`.
This commit is contained in:
@@ -68,7 +68,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().ToUint256();
|
||||
}
|
||||
return ComputeMerkleRoot(std::move(leaves), mutated);
|
||||
}
|
||||
@@ -79,7 +79,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().ToUint256();
|
||||
}
|
||||
return ComputeMerkleRoot(std::move(leaves), mutated);
|
||||
}
|
||||
@@ -185,7 +185,7 @@ std::vector<uint256> TransactionMerklePath(const CBlock& block, uint32_t positio
|
||||
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().ToUint256();
|
||||
}
|
||||
return ComputeMerklePath(leaves, position);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user