mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2025-11-03 08:07:27 +00:00
fix test
This commit is contained in:
parent
68f2168bbd
commit
a90bf1c5b8
@ -8,6 +8,7 @@ from utility.utils import (
|
|||||||
initialize_toml_config,
|
initialize_toml_config,
|
||||||
p2p_port,
|
p2p_port,
|
||||||
rpc_port,
|
rpc_port,
|
||||||
|
grpc_port,
|
||||||
blockchain_rpc_port,
|
blockchain_rpc_port,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -37,6 +38,7 @@ class ZgsNode(TestNode):
|
|||||||
libp2p_nodes.append(f"/ip4/127.0.0.1/tcp/{p2p_port(i)}")
|
libp2p_nodes.append(f"/ip4/127.0.0.1/tcp/{p2p_port(i)}")
|
||||||
|
|
||||||
rpc_listen_address = f"127.0.0.1:{rpc_port(index)}"
|
rpc_listen_address = f"127.0.0.1:{rpc_port(index)}"
|
||||||
|
grpc_listen_address = f"127.0.0.1:{grpc_port(index)}"
|
||||||
|
|
||||||
indexed_config = {
|
indexed_config = {
|
||||||
"network_libp2p_port": p2p_port(index),
|
"network_libp2p_port": p2p_port(index),
|
||||||
@ -44,6 +46,7 @@ class ZgsNode(TestNode):
|
|||||||
"rpc": {
|
"rpc": {
|
||||||
"listen_address": rpc_listen_address,
|
"listen_address": rpc_listen_address,
|
||||||
"listen_address_admin": rpc_listen_address,
|
"listen_address_admin": rpc_listen_address,
|
||||||
|
"listen_address_grpc": grpc_listen_address,
|
||||||
},
|
},
|
||||||
"network_libp2p_nodes": libp2p_nodes,
|
"network_libp2p_nodes": libp2p_nodes,
|
||||||
"log_contract_address": log_contract_address,
|
"log_contract_address": log_contract_address,
|
||||||
|
|||||||
@ -23,30 +23,33 @@ def p2p_port(n):
|
|||||||
def rpc_port(n):
|
def rpc_port(n):
|
||||||
return PortMin.n + MAX_NODES + n
|
return PortMin.n + MAX_NODES + n
|
||||||
|
|
||||||
|
def grpc_port(n):
|
||||||
|
return PortMin.n + 2 * MAX_NODES + n
|
||||||
|
|
||||||
|
|
||||||
def blockchain_p2p_port(n):
|
def blockchain_p2p_port(n):
|
||||||
assert n <= MAX_BLOCKCHAIN_NODES
|
assert n <= MAX_BLOCKCHAIN_NODES
|
||||||
return PortMin.n + MAX_NODES + MAX_BLOCKCHAIN_NODES + n
|
return PortMin.n + 3 * MAX_NODES + n
|
||||||
|
|
||||||
|
|
||||||
def blockchain_rpc_port(n):
|
def blockchain_rpc_port(n):
|
||||||
return PortMin.n + MAX_NODES + 2 * MAX_BLOCKCHAIN_NODES + n
|
return PortMin.n + 3 * MAX_NODES + MAX_BLOCKCHAIN_NODES + n
|
||||||
|
|
||||||
|
|
||||||
def blockchain_rpc_port_core(n):
|
def blockchain_rpc_port_core(n):
|
||||||
return PortMin.n + MAX_NODES + 3 * MAX_BLOCKCHAIN_NODES + n
|
return PortMin.n + 3 * MAX_NODES + 2 * MAX_BLOCKCHAIN_NODES + n
|
||||||
|
|
||||||
|
|
||||||
def blockchain_ws_port(n):
|
def blockchain_ws_port(n):
|
||||||
return PortMin.n + MAX_NODES + 4 * MAX_BLOCKCHAIN_NODES + n
|
return PortMin.n + 3 * MAX_NODES + 3 * MAX_BLOCKCHAIN_NODES + n
|
||||||
|
|
||||||
|
|
||||||
def blockchain_rpc_port_tendermint(n):
|
def blockchain_rpc_port_tendermint(n):
|
||||||
return PortMin.n + MAX_NODES + 5 * MAX_BLOCKCHAIN_NODES + n
|
return PortMin.n + 3 * MAX_NODES + 4 * MAX_BLOCKCHAIN_NODES + n
|
||||||
|
|
||||||
|
|
||||||
def pprof_port(n):
|
def pprof_port(n):
|
||||||
return PortMin.n + MAX_NODES + 6 * MAX_BLOCKCHAIN_NODES + n
|
return PortMin.n + 3 * MAX_NODES + 5 * MAX_BLOCKCHAIN_NODES + n
|
||||||
|
|
||||||
|
|
||||||
def wait_until(predicate, *, attempts=float("inf"), timeout=float("inf"), lock=None):
|
def wait_until(predicate, *, attempts=float("inf"), timeout=float("inf"), lock=None):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user