示例#1
0
文件: geth.py 项目: autolycus/populus
def reset_chain(data_dir):
    blockchain_dir = os.path.join(data_dir, "chaindata")
    utils.remove_dir_if_exists(blockchain_dir)

    dapp_dir = os.path.join(data_dir, "dapp")
    utils.remove_dir_if_exists(dapp_dir)

    nodekey_path = os.path.join(data_dir, "nodekey")
    utils.remove_file_if_exists(nodekey_path)

    geth_ipc_path = os.path.join(data_dir, "geth.ipc")
    utils.remove_file_if_exists(geth_ipc_path)
示例#2
0
def reset_chain(data_dir):
    blockchain_dir = os.path.join(data_dir, 'chaindata')
    utils.remove_dir_if_exists(blockchain_dir)

    dapp_dir = os.path.join(data_dir, 'dapp')
    utils.remove_dir_if_exists(dapp_dir)

    nodekey_path = os.path.join(data_dir, 'nodekey')
    utils.remove_file_if_exists(nodekey_path)

    geth_ipc_path = os.path.join(data_dir, 'geth.ipc')
    utils.remove_file_if_exists(geth_ipc_path)
    # Reset the known contracts so that we don't try to
    # reference contract addresses that don't exist.
    known_contracts_path = os.path.join(data_dir, KNOWN_CONTRACTS_FILE)
    utils.remove_file_if_exists(known_contracts_path)
示例#3
0
文件: geth.py 项目: PiDelport/populus
def reset_chain(data_dir):
    blockchain_dir = os.path.join(data_dir, 'chaindata')
    utils.remove_dir_if_exists(blockchain_dir)

    dapp_dir = os.path.join(data_dir, 'dapp')
    utils.remove_dir_if_exists(dapp_dir)

    nodekey_path = os.path.join(data_dir, 'nodekey')
    utils.remove_file_if_exists(nodekey_path)

    geth_ipc_path = os.path.join(data_dir, 'geth.ipc')
    utils.remove_file_if_exists(geth_ipc_path)
    # Reset the known contracts so that we don't try to
    # reference contract addresses that don't exist.
    known_contracts_path = os.path.join(data_dir, KNOWN_CONTRACTS_FILE)
    utils.remove_file_if_exists(known_contracts_path)