Skip to content

Commit

Permalink
test: functional tests for sv2 template provider
Browse files Browse the repository at this point in the history
TODO: add actual tests
  • Loading branch information
Sjors committed Dec 8, 2023
1 parent 9fb8f6a commit 6c03adb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/functional/test_framework/util.py
Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 6c03adb

Please sign in to comment.