Page MenuHomePhabricator

test: check custom descendant limit in mempool_packages.py
ClosedPublic

Authored by PiRK on Jan 4 2021, 09:19.

Details

Summary

To test the custom descendant limit on node1 (passed by the argument
-limitdescendantcount), we check for four conditions:

-> the # of txs in the node1 mempool is equal to the limit
   (plus 1 for the parent tx, plus the # txs from the previous ancestor
   test which are still in)
-> all txs in node1 mempool are a subset of txs in node0 mempool
-> part of the constructed descendant-chain (the first ones up to the
   limit) are contained in node1 mempool
-> the remaining part of the constructed descendant-chain (all after the
   first ones up to the limit) is *not* contained in node1 mempool

Note: Core accepts one more descendant than we do, as of PR15681 (change related to Lightning Network and bumping fees)

This is backport of Core PR17461

Test Plan

ninja && test/functional/test_runner.py mempool_packages

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Jan 4 2021, 09:19
PiRK planned changes to this revision.Jan 4 2021, 09:23
PiRK added inline comments.
test/functional/mempool_packages.py
293 ↗(On Diff #26595)

I had to change this by removing "+ 1" to make it work. I don't understand why.

298 ↗(On Diff #26595)

dito

300 ↗(On Diff #26595)

dito

Failed tests logs:

====== Bitcoin ABC functional tests: mempool_packages.py ======

------- Stdout: -------
2021-01-04T09:33:52.437000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210104_093234/mempool_packages_259
2021-01-04T09:34:05.668000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 120, in main
    self.run_test()
  File "/work/test/functional/mempool_packages.py", line 299, in run_test
    assert tx in mempool1
AssertionError
2021-01-04T09:34:05.718000Z TestFramework (INFO): Stopping nodes
2021-01-04T09:34:06.020000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210104_093234/mempool_packages_259
2021-01-04T09:34:06.020000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210104_093234/mempool_packages_259/test_framework.log
2021-01-04T09:34:06.020000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210104_093234/mempool_packages_259' to consolidate all logs

Each failure log is accessible here:
Bitcoin ABC functional tests: mempool_packages.py

PiRK edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jan 8 2021, 00:58