mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-06 13:10:09 +02:00
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
This commit is contained in:
commit
4be489d4d4
@ -45,7 +45,7 @@ FUZZ_TARGET_INIT(txorphan, initialize_orphanage)
|
|||||||
// if true, allow duplicate input when constructing tx
|
// if true, allow duplicate input when constructing tx
|
||||||
const bool duplicate_input = fuzzed_data_provider.ConsumeBool();
|
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
|
// construct transaction
|
||||||
const CTransactionRef tx = [&] {
|
const CTransactionRef tx = [&] {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user