mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 02:33:07 +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:
@@ -19,7 +19,7 @@ uint256 ComputeMerkleRootFromPath(const CBlock& block, uint32_t position, const
|
||||
throw std::out_of_range("Position out of range");
|
||||
}
|
||||
|
||||
uint256 current_hash = block.vtx[position]->GetHash();
|
||||
uint256 current_hash = block.vtx[position]->GetHash().ToUint256();
|
||||
|
||||
for (const uint256& sibling : merkle_path) {
|
||||
if (position % 2 == 0) {
|
||||
@@ -47,7 +47,7 @@ FUZZ_TARGET(merkle)
|
||||
tx_hashes.reserve(num_txs);
|
||||
|
||||
for (size_t i = 0; i < num_txs; ++i) {
|
||||
tx_hashes.push_back(block->vtx[i]->GetHash());
|
||||
tx_hashes.push_back(block->vtx[i]->GetHash().ToUint256());
|
||||
}
|
||||
|
||||
// Test ComputeMerkleRoot
|
||||
|
||||
@@ -139,7 +139,7 @@ CBlock ConsumeBlock(FuzzedDataProvider& fuzzed_data_provider, const uint256& pre
|
||||
tx.vout[0].nValue = 0;
|
||||
tx.vin[0].scriptSig.resize(2);
|
||||
block.vtx.push_back(MakeTransactionRef(tx));
|
||||
block.hashMerkleRoot = block.vtx[0]->GetHash();
|
||||
block.hashMerkleRoot = block.vtx[0]->GetHash().ToUint256();
|
||||
return block;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user