mirror of https://github.com/nucypher/nucypher.git
Allow the init of a character without a checksum address until Moe inherets from Learner directly.
parent
39fd967222
commit
ad4dce6dd3
|
@ -209,10 +209,11 @@ class Character(Learner):
|
|||
# Decentralized
|
||||
#
|
||||
if not federated_only:
|
||||
if not checksum_address:
|
||||
raise ValueError("No checksum_address provided to run in decentralized mode.")
|
||||
else:
|
||||
self._checksum_address = checksum_address # TODO: Check that this matches TransactingPower
|
||||
# TODO: WHY MOE?
|
||||
# if not checksum_address:
|
||||
# raise ValueError("No checksum_address provided to run in decentralized mode.")
|
||||
# else:
|
||||
self._checksum_address = checksum_address # TODO: Check that this matches TransactingPower
|
||||
#
|
||||
# Federated
|
||||
#
|
||||
|
@ -230,13 +231,14 @@ class Character(Learner):
|
|||
#
|
||||
# Nicknames
|
||||
#
|
||||
try:
|
||||
self.nickname, self.nickname_metadata = nickname_from_seed(self.checksum_address)
|
||||
except SigningPower.not_found_error:
|
||||
if self.federated_only:
|
||||
self.nickname = self.nickname_metadata = NO_NICKNAME
|
||||
else:
|
||||
raise
|
||||
if checksum_address: # TODO WHY MOE??
|
||||
try:
|
||||
self.nickname, self.nickname_metadata = nickname_from_seed(self.checksum_address)
|
||||
except SigningPower.not_found_error:
|
||||
if self.federated_only:
|
||||
self.nickname = self.nickname_metadata = NO_NICKNAME
|
||||
else:
|
||||
raise
|
||||
|
||||
#
|
||||
# Fleet state
|
||||
|
|
|
@ -33,13 +33,14 @@ from nucypher.characters.base import Character
|
|||
from nucypher.config.constants import TEMPLATES_DIR
|
||||
from nucypher.crypto.powers import SigningPower, TransactingPower
|
||||
from nucypher.keystore.threading import ThreadedSession
|
||||
from nucypher.network.nodes import FleetStateTracker
|
||||
from nucypher.network.nodes import FleetStateTracker, Learner
|
||||
from nucypher.network.status.status_page import MoeStatusPage
|
||||
|
||||
|
||||
class Moe(Character):
|
||||
"""
|
||||
A monitor (lizard?)
|
||||
# TODO: Inherit directly from Learner
|
||||
"""
|
||||
banner = MOE_BANNER
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ class MoeStatusPage(NetworkStatusPage):
|
|||
"""
|
||||
|
||||
def __init__(self, moe: Learner, ws_port: int, *args, **kwargs):
|
||||
super().__init__(self, *args, **kwargs)
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
# modify index_string page template so that the websocket port for hendrix
|
||||
# updates can be directly provided included in javascript snippet
|
||||
|
|
Loading…
Reference in New Issue