Skip to content

Commit

Permalink
fix codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
renauter committed Nov 26, 2023
1 parent dd1dc75 commit 67da247
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions substrate-node/tests/SubstrateNetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


SUBSTRATE_NODE_DIR = dirname(os.getcwd())
TMP_DIR = "\tmp"
TFCHAIN_EXE = join(SUBSTRATE_NODE_DIR, "target", "release", "tfchain")

RE_NODE_STARTED = re.compile("Running JSON-RPC server")
Expand Down Expand Up @@ -151,17 +152,17 @@ def setup_multi_node_network(self, log_name: str = "", amt: int = 1):
rmtree(output_dir_network, ignore_errors=True)

port = 30333
rpc_port = 9944
rpc_port = 994

if amt == 1:
log_file_alice = join(output_dir_network, "node_alice.log")
self._nodes["alice"] = run_single_node(log_file_alice, "/tmp/alice", port, rpc_port)
self._nodes["alice"] = run_single_node(log_file_alice, f"{TMP_DIR}/alice", port, rpc_port)
wait_till_node_ready(log_file_alice)
setup_offchain_workers(rpc_port, "Alice")
wait_till_first_block(log_file_alice)
else:
log_file_alice = join(output_dir_network, "node_alice.log")
self._nodes["alice"] = run_node(log_file_alice, "/tmp/alice", "alice", port,
self._nodes["alice"] = run_node(log_file_alice, f"{TMP_DIR}/alice", "alice", port,
rpc_port, node_key="0000000000000000000000000000000000000000000000000000000000000001")
wait_till_node_ready(log_file_alice)
setup_offchain_workers(rpc_port, "Alice")
Expand All @@ -173,7 +174,7 @@ def setup_multi_node_network(self, log_name: str = "", amt: int = 1):
rpc_port += 1
name = list(PREDEFINED_KEYS.keys())[x].lower()
log_file = join(output_dir_network, f"node_{name}.log")
self._nodes[name] = run_node(log_file, f"/tmp/{name}", name, port, rpc_port, node_key=None,
self._nodes[name] = run_node(log_file, f"{TMP_DIR}/{name}", name, port, rpc_port, node_key=None,
bootnodes="/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp")
wait_till_node_ready(log_file)
setup_offchain_workers(rpc_port, "Bob")
Expand Down

0 comments on commit 67da247

Please sign in to comment.