mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
test: speedup interface_rest.py by whitelisting peers (immediate tx relay)
By whitelisting the peers via -whitelist, the inventory is transmissioned immediately rather than on average every 5 seconds, speeding up the test by at least a factor of two: before: $ time ./interface_rest.py ... 0m14.82s real 0m01.44s user 0m01.19s system with this commit: $ time ./interface_rest.py ... 0m05.67s real 0m01.07s user 0m01.35s system
This commit is contained in:
parent
11b9684dfd
commit
438e6f4c33
1 changed files with 3 additions and 0 deletions
|
@ -52,6 +52,9 @@ class RESTTest (BitcoinTestFramework):
|
|||
def set_test_params(self):
|
||||
self.num_nodes = 2
|
||||
self.extra_args = [["-rest", "-blockfilterindex=1"], []]
|
||||
# whitelist peers to speed up tx relay / mempool sync
|
||||
for args in self.extra_args:
|
||||
args.append("-whitelist=noban@127.0.0.1")
|
||||
self.supports_cli = False
|
||||
|
||||
def test_rest_request(self, uri, http_method='GET', req_type=ReqType.JSON, body='', status=200, ret_type=RetType.JSON):
|
||||
|
|
Loading…
Add table
Reference in a new issue