From 4ece47decee0f06cbdafd4711bf0ea470d5deb55 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Wed, 29 Nov 2023 18:21:58 +0100 Subject: [PATCH] test: functional tests for sv2 template provider TODO: add actual tests --- test/functional/test_framework/util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index c65e3e38e66a15..a213418c782913 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -336,6 +336,8 @@ def p2p_port(n): def rpc_port(n): return PORT_MIN + PORT_RANGE + n + (MAX_NODES * PortSeed.n) % (PORT_RANGE - 1 - MAX_NODES) +def sv2_port(n): + return rpc_port(n) * 2 def rpc_url(datadir, i, chain, rpchost): rpc_u, rpc_p = get_auth_cookie(datadir, chain) @@ -379,6 +381,7 @@ def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect= f.write("[{}]\n".format(chain_name_conf_section)) f.write("port=" + str(p2p_port(n)) + "\n") f.write("rpcport=" + str(rpc_port(n)) + "\n") + f.write("stratumv2=" + str(sv2_port(n)) + "\n") # Disable server-side timeouts to avoid intermittent issues f.write("rpcservertimeout=99000\n") f.write("rpcdoccheck=1\n")