mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
fuzz: Improve fuzzing stability for txorphan harness
This commit is contained in:
@@ -129,11 +129,12 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
|
||||
}
|
||||
|
||||
// Test LimitOrphanTxSize() function:
|
||||
orphanage.LimitOrphans(40);
|
||||
FastRandomContext rng{/*fDeterministic=*/true};
|
||||
orphanage.LimitOrphans(40, rng);
|
||||
BOOST_CHECK(orphanage.CountOrphans() <= 40);
|
||||
orphanage.LimitOrphans(10);
|
||||
orphanage.LimitOrphans(10, rng);
|
||||
BOOST_CHECK(orphanage.CountOrphans() <= 10);
|
||||
orphanage.LimitOrphans(0);
|
||||
orphanage.LimitOrphans(0, rng);
|
||||
BOOST_CHECK(orphanage.CountOrphans() == 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user