diff options
author | AngusP <angus@toaster.cc> | 2024-06-04 19:27:30 +0100 |
---|---|---|
committer | AngusP <angus@toaster.cc> | 2024-06-06 13:08:17 +0100 |
commit | 4c99301220ab44e98d0d0e1cc8d774d96a25b7aa (patch) | |
tree | db805a0ca489918fee31fabe2a9088d74cbd4f5b /src/blockencodings.h | |
parent | 4621e7cc8f8e2b71393a2b30d5dbe56165bfb854 (diff) | |
download | bitcoin-4c99301220ab44e98d0d0e1cc8d774d96a25b7aa.tar.xz |
test: Add ReceiveWithExtraTransactions Compact Block receive test.
This new test uses the `vExtraTxnForCompact` (`extra_txn`) vector of
optional orphan/conflicted/etc. transactions to provide a transaction
in a compact block that was not otherwise present in our mempool.
This also covers an improbable nullptr deref bug addressed in
bf031a517c79cec5b43420bcd40291ab0e9f68a8 (#29752) where the
`extra_txn` vec/circular-buffer was sometimes null-initialized and
not yet filled when dereferenced in `PartiallyDownloadedBlock::InitData`.
Diffstat (limited to 'src/blockencodings.h')
-rw-r--r-- | src/blockencodings.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blockencodings.h b/src/blockencodings.h index 2b1fabadd6..01594db527 100644 --- a/src/blockencodings.h +++ b/src/blockencodings.h @@ -141,7 +141,7 @@ public: explicit PartiallyDownloadedBlock(CTxMemPool* poolIn) : pool(poolIn) {} - // extra_txn is a list of extra transactions to look at, in <witness hash, reference> form + // extra_txn is a list of extra orphan/conflicted/etc transactions to look at ReadStatus InitData(const CBlockHeaderAndShortTxIDs& cmpctblock, const std::vector<CTransactionRef>& extra_txn); bool IsTxAvailable(size_t index) const; ReadStatus FillBlock(CBlock& block, const std::vector<CTransactionRef>& vtx_missing); |