def init_with_genesis(smoketest_genesis):
with open(GENESIS_PATH, 'wb') as handler:
json.dump(smoketest_genesis, handler)
cmd = '$RST_GETH_BINARY --datadir $RST_DATADIR init {}'.format(GENESIS_PATH)
args = shlex.split(
Template(cmd).substitute(os.environ)
)
init = subprocess.Popen(
args,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
out, err = init.communicate()
assert init.returncode == 0
return (out, err)
评论列表
文章目录