Skip to content

Commit

Permalink
fuzz: explain package eval coin tracking better
Browse files Browse the repository at this point in the history
  • Loading branch information
instagibbs committed Nov 20, 2024
1 parent bc0d98e commit c041ad6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/fuzz/package_eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ FUZZ_TARGET(ephemeral_package_eval, .init = initialize_tx_pool)

CAmount amount_in{0};
for (int i = 0; i < num_in; ++i) {
// Pop random outpoint
// Pop random outpoint. We erase them to avoid double-spending
// while in this loop, but later add them back (unless last_tx).
auto pop = outpoints.begin();
std::advance(pop, fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, outpoints.size() - 1));
auto outpoint = *pop;
Expand Down Expand Up @@ -405,7 +406,8 @@ FUZZ_TARGET(tx_package_eval, .init = initialize_tx_pool)

CAmount amount_in{0};
for (size_t i = 0; i < num_in; ++i) {
// Pop random outpoint
// Pop random outpoint. We erase them to avoid double-spending
// while in this loop, but later add them back (unless last_tx).
auto pop = outpoints.begin();
std::advance(pop, fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, outpoints.size() - 1));
const auto outpoint = *pop;
Expand Down

0 comments on commit c041ad6

Please sign in to comment.