Page MenuHomePhabricator

Tests: speed up fundrawtransaction test
ClosedPublic

Authored by PiRK on Nov 4 2020, 10:58.

Details

Reviewers
majcosta
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC3687ad6dbc11: Tests: speed up fundrawtransaction test
Summary

[tests] Speed up rpc_fundrawtransaction.py

Most of the time in rpc_fundrawtransaction.py is spent waiting for
unconfirmed transactions to propagate. Net processing adds a poisson
random delay to the time it will INV transactions with a mean interval
of 5 seconds.

Instead just generate the block on the node that sent the transaction:

rpc_fundrawtransaction.py is not intended to be a test for transaction
relay, so it's ok to do this.

[tests] Use -whitelist in rpc_fundrawtransaction.py

Makes tx relay faster

[tests] Don't stop-start unnecessarily in rpc_fundrawtransaction.py

This was only added in c1dde3a949b36ce9c2155777b3fa1372e7ed97d8 to match
behaviour when encryptwallet would restart the node. It's not required
for the test (and slows things down).

This is a backport of Core PR17340

Test Plan
$ ninja && test/functional/test_runner.py rpc_fundrawtransaction
...
rpc_fundrawtransaction.py passed, Duration: 86 s

$ git cherry-pick 646b593bbd0db113c6e45ab92177b8f5251e8710
$ ninja && test/functional/test_runner.py rpc_fundrawtransaction
...
rpc_fundrawtransaction.py passed, Duration: 64 s

$ git cherry-pick 9a8505299ba392acbab4647963113b0c29495f1d
$ ninja && test/functional/test_runner.py rpc_fundrawtransaction
...
rpc_fundrawtransaction.py passed, Duration: 44 s

$ git cherry-pick af7bae734089f6af0029b0887932ccd9a469e12e
$ ninja && test/functional/test_runner.py rpc_fundrawtransaction
...
rpc_fundrawtransaction.py passed, Duration: 42 s

Diff Detail

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

Event Timeline

Owners added a reviewer: Restricted Owners Package.Nov 4 2020, 10:58
PiRK requested review of this revision.Nov 4 2020, 10:58
PiRK edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Nov 4 2020, 18:42
This revision was automatically updated to reflect the committed changes.