mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
[prep/test] have TxOrphanage remember its own limits in LimitOrphans
Move towards a model where TxOrphanage is initialized with limits that it remembers throughout its lifetime. Remove the param. Limiting by number of unique orphans will be removed in a later commit. Now that -maxorphantx is gone, this does not change the node behavior. The parameter is only used in tests.
This commit is contained in:
@@ -217,9 +217,8 @@ FUZZ_TARGET(txorphan, .init = initialize_orphanage)
|
||||
[&] {
|
||||
// test mocktime and expiry
|
||||
SetMockTime(ConsumeTime(fuzzed_data_provider));
|
||||
auto limit = fuzzed_data_provider.ConsumeIntegral<unsigned int>();
|
||||
orphanage.LimitOrphans(limit, orphanage_rng);
|
||||
Assert(orphanage.Size() <= limit);
|
||||
orphanage.LimitOrphans(orphanage_rng);
|
||||
Assert(orphanage.Size() <= node::DEFAULT_MAX_ORPHAN_TRANSACTIONS);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user