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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

schancel created this revision.Oct 5 2018, 21:42
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 5 2018, 21:42
schancel updated this revision to Diff 5298.Oct 5 2018, 21:44

Remove erroroneous inclusions

schancel edited the test plan for this revision. (Show Details)Oct 5 2018, 21:45
schancel planned changes to this revision.Oct 6 2018, 21:09

This can probably be improved quite a bit.

schancel updated this revision to Diff 5314.Oct 8 2018, 22:12

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 updated this revision to Diff 5317.Oct 8 2018, 23:18
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
jasonbcox accepted this revision.Oct 9 2018, 21:23
This revision is now accepted and ready to land.Oct 9 2018, 21:23
This revision was automatically updated to reflect the committed changes.