def main(eth_nodes, seed, raiden_executable, raiden_args):
if ETH_RPC_ENDPOINT_ARG in raiden_args:
raise RuntimeError("Argument conflict: {}".format(ETH_RPC_ENDPOINT_ARG))
eth_nodes = eth_nodes.split(",")
offset = sum(ord(c) for c in seed) % len(eth_nodes)
target_eth_node = eth_nodes[offset]
raiden_args = [raiden_executable] + list(raiden_args) + [ETH_RPC_ENDPOINT_ARG, target_eth_node]
print(" ".join(raiden_args))
# Ensure print is flushed - exec could swallow it
sys.stdout.flush()
os.execvp(raiden_args[0], raiden_args)
评论列表
文章目录