mirror of https://github.com/nucypher/nucypher.git
Encod new felix node password on init.
parent
81cbdd7404
commit
cdaf2da1d9
|
@ -3,7 +3,7 @@ import os
|
|||
|
||||
from constant_sorrow.constants import NOT_RUNNING
|
||||
from geth import LoggingMixin
|
||||
from geth.accounts import ensure_account_exists
|
||||
from geth.accounts import ensure_account_exists, get_accounts, create_new_account
|
||||
from geth.chain import (
|
||||
get_chain_data_dir,
|
||||
initialize_chain,
|
||||
|
@ -132,7 +132,11 @@ class NuCypherGethDevnetProcess(NuCypherGethProcess):
|
|||
geth_kwargs = {'network_id': str(cls.__CHAIN_ID),
|
||||
'port': str(cls.P2P_PORT),
|
||||
'verbosity': str(cls.VERBOSITY),
|
||||
'data_dir': data_dir,
|
||||
'password': password.encode()}
|
||||
etherbase = ensure_account_exists(**geth_kwargs)
|
||||
return etherbase
|
||||
'data_dir': data_dir}
|
||||
|
||||
accounts = get_accounts(**geth_kwargs)
|
||||
if not accounts:
|
||||
account = create_new_account(password=password.encode(), **geth_kwargs)
|
||||
else:
|
||||
account = accounts[0]
|
||||
return account
|
||||
|
|
|
@ -72,7 +72,8 @@ def felix(click_config,
|
|||
|
||||
if geth:
|
||||
data_dir = os.path.join(config_root, '.ethereum', network)
|
||||
new_checksum_address = NuCypherGethDevnetProcess.ensure_account_exists(password=new_password, data_dir=data_dir)
|
||||
new_checksum_address = NuCypherGethDevnetProcess.ensure_account_exists(password=new_password,
|
||||
data_dir=data_dir)
|
||||
click.prompt(f"New geth address is {new_checksum_address}. \n"
|
||||
f"Press ENTER key to continue", default=True)
|
||||
|
||||
|
|
Loading…
Reference in New Issue