mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 09:43:55 +02:00
refactor: Simplify extra_txn to be a vec of CTransactionRef instead of a vec of pair<Wtxid, CTransactionRef>
All `CTransactionRef` have `.GetWitnessHash()` that returns a cached `const Wtxid` (since fac1223a56),
so we don't need to pass transaction refs around with their IDs as they're easy to get from a ref.
This commit is contained in:
@@ -60,7 +60,7 @@ FUZZ_TARGET(partially_downloaded_block, .init = initialize_pdb)
|
||||
// The coinbase is always available
|
||||
available.insert(0);
|
||||
|
||||
std::vector<std::pair<Wtxid, CTransactionRef>> extra_txn;
|
||||
std::vector<CTransactionRef> extra_txn;
|
||||
for (size_t i = 1; i < block->vtx.size(); ++i) {
|
||||
auto tx{block->vtx[i]};
|
||||
|
||||
@@ -68,7 +68,7 @@ FUZZ_TARGET(partially_downloaded_block, .init = initialize_pdb)
|
||||
bool add_to_mempool{fuzzed_data_provider.ConsumeBool()};
|
||||
|
||||
if (add_to_extra_txn) {
|
||||
extra_txn.emplace_back(tx->GetWitnessHash(), tx);
|
||||
extra_txn.emplace_back(tx);
|
||||
available.insert(i);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user