Makes TACoDomain.__hash__ consistent with __eq__.

pull/3322/head
Kieran Prasch 2023-10-31 14:23:01 +01:00 committed by KPrasch
parent c4d4523bec
commit 63d2e0265c
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ class TACoDomain:
return self.name
def __hash__(self) -> int:
return hash(self.name)
return hash((self.name, self.eth_chain, self.polygon_chain))
def __bytes__(self) -> bytes:
return self.name.encode()

View File

@ -6,7 +6,7 @@ from nucypher.config.constants import TEMPORARY_DOMAIN_NAME
from nucypher.config.storages import ForgetfulNodeStorage, TemporaryFileBasedNodeStorage
from nucypher.policy.payment import SubscriptionManagerPayment
from nucypher.utilities.networking import LOOPBACK_ADDRESS
from tests.constants import MOCK_ETH_PROVIDER_URI, TESTERCHAIN_CHAIN_ID
from tests.constants import MOCK_ETH_PROVIDER_URI
from tests.utils.ursula import select_test_port
ADDITIONAL_NODES_TO_LEARN_ABOUT = 10