mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
Merge bitcoin/bitcoin#29752: refactor: Use typesafe Wtxid in compact block encodings
a8203e9412refactor: Simplify `extra_txn` to be a vec of CTransactionRef instead of a vec of pair<Wtxid, CTransactionRef> (AngusP)c3c18433aerefactor: Use typesafe Wtxid in compact block encoding message, instead of ambiguous uint256. (AngusP) Pull request description: The first commit replaces `uint256` with typesafe `Wtxid` (or `Txid`) types introduced in #28107. The second commit then simplifies the extra tx `vector` to just be of `CTransactionRef`s instead of a `std::pair<Wtxid, CTransactionRef>`, as it's easy to get a `Wtxid` from a transaction ref. ACKs for top commit: glozow: ACKa8203e9412dergoegge: ACKa8203e9412Tree-SHA512: b4ba1423a8059f9fc118782bd8a668213d229c822f22b01267de74d6ea97fe4f2aad46b5da7c0178ecc9905293e9a0eafba1d75330297c055e27fd53c8c8ebfd
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<uint256, 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