aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-10-02 17:13:59 +0100
committerfanquake <fanquake@gmail.com>2022-10-02 17:14:14 +0100
commit4be489d4d4a1b8ef64d9f6dcdbc0c6574f934aa4 (patch)
treee692287d677bd752c67bfd046349d977b65dbb00 /src/test
parentf34c98a46035827cb6ab4302daae2d388e707568 (diff)
parentfa5752da6a58fadd3f79f47ff98b796d9768872a (diff)
Merge bitcoin/bitcoin#26227: [24.x] fuzz: Limit outpoints.size in txorphan target to avoid OOM
fa5752da6a58fadd3f79f47ff98b796d9768872a fuzz: Limit outpoints.size in txorphan target to avoid OOM (MacroFake) Pull request description: Identical commit from https://github.com/bitcoin/bitcoin/pull/26216 ACKs for top commit: fanquake: ACK fa5752da6a58fadd3f79f47ff98b796d9768872a Tree-SHA512: fa9bd1defb71b6bc2c62a6cdec5958576cafa0b41cdfebe11d48dd13505eb4a5e0e1d2ce55c0ed561d2a872dab6bb10bd71d941899b3b0eb0b2c38e6b3691ed5
Diffstat (limited to 'src/test')
-rw-r--r--src/test/fuzz/txorphan.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/fuzz/txorphan.cpp b/src/test/fuzz/txorphan.cpp
index 943f3f5fdf..55060f31cf 100644
--- a/src/test/fuzz/txorphan.cpp
+++ b/src/test/fuzz/txorphan.cpp
@@ -45,7 +45,7 @@ FUZZ_TARGET_INIT(txorphan, initialize_orphanage)
// if true, allow duplicate input when constructing tx
const bool duplicate_input = fuzzed_data_provider.ConsumeBool();
- LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10 * DEFAULT_MAX_ORPHAN_TRANSACTIONS)
+ LIMITED_WHILE(outpoints.size() < 200'000 && fuzzed_data_provider.ConsumeBool(), 10 * DEFAULT_MAX_ORPHAN_TRANSACTIONS)
{
// construct transaction
const CTransactionRef tx = [&] {