mirror of https://github.com/nucypher/nucypher.git
Modify load_seednodes to use the 'TEACHER_NODES' constant specific to the network domain
parent
e717e213d1
commit
755acbf556
|
@ -9,6 +9,8 @@ from nucypher.characters.lawful import Ursula
|
|||
from nucypher.cli.config import NucypherClickConfig
|
||||
from nucypher.config.constants import DEFAULT_CONFIG_ROOT, USER_LOG_DIR
|
||||
from nucypher.network.middleware import RestMiddleware
|
||||
from nucypher.network.teachers import TEACHER_NODES
|
||||
|
||||
|
||||
DESTRUCTION = '''
|
||||
*Permanently and irreversibly delete all* nucypher files including:
|
||||
|
@ -35,14 +37,14 @@ console_emitter = NucypherClickConfig.emit
|
|||
|
||||
def load_seednodes(min_stake: int,
|
||||
federated_only: bool,
|
||||
network_domain: str,
|
||||
network_middleware: RestMiddleware = None,
|
||||
teacher_uris: list = None
|
||||
) -> List[Ursula]:
|
||||
|
||||
teacher_nodes = list()
|
||||
if teacher_uris is None:
|
||||
# Default teacher nodes can be placed here
|
||||
return teacher_nodes
|
||||
teacher_uris = TEACHER_NODES[network_domain]
|
||||
for uri in teacher_uris:
|
||||
teacher_node = Ursula.from_teacher_uri(teacher_uri=uri,
|
||||
min_stake=min_stake,
|
||||
|
|
|
@ -17,6 +17,8 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
|
||||
# Hardcoded teacher nodes for, both, our testnet and mainnet.
|
||||
TESTNET = []
|
||||
|
||||
MAINNET = []
|
||||
# Stored as a dict with the domain as the key.
|
||||
TEACHER_NODES = {
|
||||
'goerli-testnet': [],
|
||||
'mainnet': [],
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue