HomePhabricator

[tests] make pruning test faster

Description

[tests] make pruning test faster

Summary:

This commit makes the pruning.py much faster.

Key insights to do this:

- pruning.py doesn't care what kind of transactions make up the big
blocks that are pruned in the test. Instead of making blocks with
several large, expensive to construct and validate transactions,
instead make the large blocks contain a single coinbase transaction with
a huge OP_RETURN txout.
- avoid stop-starting nodes where possible.

This test could probably be made even faster by using the P2P interface
for submitting blocks instead of the submitblock RPC.

Completes backport of core PR15686 (commit 03d6d23):
https://github.com/bitcoin/bitcoin/pull/15686/commits/03d6d238104d228acfae9f3e122879bddef8d27d

Depends on D4561.

Test Plan:

./test/functional/test_runner.py feature_pruning

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D4562

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Jun 13 2017, 18:36
FabienCommitted on Nov 27 2019, 20:09
jasonbcoxPushed on Nov 27 2019, 21:52
Reviewer
Restricted Project
Differential Revision
D4562: [tests] make pruning test faster
Parents
rSTAGING7fc0622aca99: [tests] style fixes in feature_pruning.py
Branches
Unknown
Tags
Unknown