def upload_platon(node: Node, platon_bin): """ Upload a binary file to the specified node :param node: :param platon_bin: :return: """ node.run_ssh("rm -rf {}".format(node.remote_bin_file)) node.upload_file(platon_bin, node.remote_bin_file) node.run_ssh("chmod +x {}".format(node.remote_bin_file)) node.run_ssh("mkdir zlp")
def upload_platon(node: Node, platon_bin): """ Upload a binary file to the specified node :param node: :param platon_bin: :return: """ node.run_ssh("rm -rf {}".format(node.remote_bin_file)) node.upload_file(platon_bin, node.remote_bin_file) node.run_ssh("chmod +x {}".format(node.remote_bin_file)) log.info(f"Node {node.node_mark} upload platon succeed") node.restart()
def backup(node: Node): return node.backup_log()
def init(node_config): return Node(node_config, self.cfg, self.chain_id)
def clean_db(node: Node): return node.clean_db()
def clean(node: Node): return node.clean()
def restart(node: Node): return node.restart()
def stop(node: Node): return node.stop()
def prepare(node: Node): return node.put_all_file(genesis_file)
def start(node: Node, need_init_chain): return node.start(need_init_chain)
def close(node: Node): return node.close()
def assert_error_deploy(env: Node, genesis_file, msg="Error config"): is_success, err_msg = env.deploy_me(genesis_file) assert not is_success, "{}-{}".format(msg, err_msg)