Page MenuHomePhabricator

Add a test case to ensure mempool accounting is correct
ClosedPublic

Authored by schancel on Oct 5 2018, 21:42.

Details

Summary

Add a test case to ensure that accounting of package statistics are
correct across a chain of transactions

Test Plan
make ./src/test/test_bitcoin && ./src/test/test_bitcoin --run_test=mempool_tests/TestPackageAccounting

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Remove erroroneous inclusions

This can probably be improved quite a bit.

Make a hypergraph instead of a linear change of transactions.

jasonbcox added inline comments.
src/test/mempool_tests.cpp
46 ↗(On Diff #5314)

Why use a while-loop instead of a for-loop?

101 ↗(On Diff #5314)

Is this test intended to cover varying fees/values? If so, add some randomness to the fee and/or value of the inputs/outputs.

schancel marked an inline comment as done.

Switch to a for loop, and randomize fees.

schancel retitled this revision from Add a test case to ensure mempool acounting is correct to Add a test case to ensure mempool accounting is correct.Oct 9 2018, 17:25
This revision is now accepted and ready to land.Oct 9 2018, 21:23
This revision was automatically updated to reflect the committed changes.