mirror of https://github.com/nucypher/nucypher.git
Fixes to respond to RFCs: GLOBAL_DOMAIN docstring, bad line break.
parent
731682a225
commit
485a362da3
|
@ -38,8 +38,8 @@ from umbral.signing import Signature
|
|||
|
||||
from bytestring_splitter import BytestringKwargifier, BytestringSplittingError
|
||||
from bytestring_splitter import BytestringSplitter, VariableLengthBytestring
|
||||
from constant_sorrow import constants
|
||||
from constant_sorrow.constants import INCLUDED_IN_BYTESTRING, constant_or_bytes
|
||||
from constant_sorrow import constants, constant_or_bytes
|
||||
from constant_sorrow.constants import INCLUDED_IN_BYTESTRING
|
||||
from nucypher.blockchain.eth.actors import PolicyAuthor, Miner
|
||||
from nucypher.blockchain.eth.agents import MinerAgent
|
||||
from nucypher.characters.base import Character, Learner
|
||||
|
|
|
@ -56,7 +56,7 @@ def build_fleet_state_status(ursula) -> str:
|
|||
fleet_state = '{checksum} ⇀{nickname}↽ {icon}'.format(icon=fleet_state_icon,
|
||||
nickname=fleet_state_nickname,
|
||||
checksum=fleet_state_checksum)
|
||||
elif ursula.known_nodes.checksum is not NO_KNOWN_NODES:
|
||||
elif ursula.known_nodes.checksum is NO_KNOWN_NODES:
|
||||
fleet_state = 'No Known Nodes'
|
||||
else:
|
||||
fleet_state = 'Unknown'
|
||||
|
|
|
@ -37,8 +37,8 @@ from twisted.logger import Logger
|
|||
|
||||
from bytestring_splitter import BytestringSplitter
|
||||
from bytestring_splitter import VariableLengthBytestring, BytestringSplittingError
|
||||
from constant_sorrow import constants
|
||||
from constant_sorrow.constants import constant_or_bytes, GLOBAL_DOMAIN
|
||||
from constant_sorrow import constants, constant_or_bytes
|
||||
from constant_sorrow.constants import GLOBAL_DOMAIN
|
||||
from nucypher.config.constants import SeednodeMetadata
|
||||
from nucypher.config.storages import ForgetfulNodeStorage
|
||||
from nucypher.crypto.api import keccak_digest
|
||||
|
@ -51,6 +51,13 @@ from nucypher.network.protocols import SuspiciousActivity
|
|||
from nucypher.network.server import TLSHostingPower
|
||||
|
||||
|
||||
GLOBAL_DOMAIN.set_constant_documentation(
|
||||
"""
|
||||
If this domain is among those being learned or served, then domain checking is skipped.
|
||||
A Learner learning about the GLOBAL_DOMAIN will learn about all nodes.
|
||||
A Teacher serving the GLOBAL_DOMAIN will teach about all nodes.
|
||||
""")
|
||||
|
||||
def icon_from_checksum(checksum,
|
||||
nickname_metadata,
|
||||
number_of_nodes="Unknown number of "):
|
||||
|
|
|
@ -64,8 +64,8 @@ def test_blockchain_ursula_is_not_valid_with_unsigned_identity_evidence(blockcha
|
|||
assert len(warnings) == 1
|
||||
assert warnings[0]['log_format'] == unsigned.invalid_metadata_message.format(unsigned)
|
||||
|
||||
assert len(lonely_blockchain_learner.known_nodes) == len(
|
||||
blockchain_ursulas) - 2 # minus self and, of course, unsigned.
|
||||
# minus 2 for self and, of course, unsigned.
|
||||
assert len(lonely_blockchain_learner.known_nodes) == len(blockchain_ursulas) - 2
|
||||
assert blockchain_teacher in lonely_blockchain_learner.known_nodes
|
||||
assert unsigned not in lonely_blockchain_learner.known_nodes
|
||||
|
||||
|
|
Loading…
Reference in New Issue