Skip to content

Commit 438e6f4

Browse files
committed
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
1 parent 11b9684 commit 438e6f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/functional/interface_rest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ class RESTTest (BitcoinTestFramework):
5252
def set_test_params(self):
5353
self.num_nodes = 2
5454
self.extra_args = [["-rest", "-blockfilterindex=1"], []]
55+
# whitelist peers to speed up tx relay / mempool sync
56+
for args in self.extra_args:
57+
args.append("[email protected]")
5558
self.supports_cli = False
5659

5760
def test_rest_request(self, uri, http_method='GET', req_type=ReqType.JSON, body='', status=200, ret_type=RetType.JSON):

0 commit comments

Comments
 (0)