Skip to content

Commit c041ad6

Browse files
committed
fuzz: explain package eval coin tracking better
1 parent bc0d98e commit c041ad6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/fuzz/package_eval.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ FUZZ_TARGET(ephemeral_package_eval, .init = initialize_tx_pool)
248248

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

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

0 commit comments

Comments
 (0)