Rename back method name for is_provider_key_set

pull/3588/head
Manuel Montenegro 2025-04-08 16:56:43 +02:00
parent 275f38f9d5
commit 0f5dcabcea
No known key found for this signature in database
GPG Key ID: AB138CC82DC9FAD4
4 changed files with 6 additions and 4 deletions

View File

@ -258,7 +258,7 @@ class Operator(BaseActor):
def set_provider_public_key(self) -> Union[TxReceipt, None]:
# TODO: Here we're assuming there is one global key per node. See nucypher/#3167
node_global_ferveo_key_set = self.coordinator_agent.is_provider_key_set(
node_global_ferveo_key_set = self.coordinator_agent.is_provider_public_key_set(
self.staking_provider_address
)
if not node_global_ferveo_key_set:

View File

@ -748,7 +748,7 @@ class CoordinatorAgent(EthereumContractAgent):
return is_authorized
@contract_api(CONTRACT_CALL)
def is_provider_key_set(self, staking_provider: ChecksumAddress) -> bool:
def is_provider_public_key_set(self, staking_provider: ChecksumAddress) -> bool:
result = self.contract.functions.isProviderKeySet(staking_provider).call()
return result

View File

@ -104,7 +104,9 @@ class UrsulaConfiguration(CharacterConfiguration):
)
if staking_provider_address and staking_provider_address != NULL_ADDRESS:
if coordinator_agent.is_provider_key_set(staking_provider_address):
if coordinator_agent.is_provider_public_key_set(
staking_provider_address
):
message = (
f"Operator {self.operator_address} has already published a public key.\n"
f"It is not permitted to create a new node with this operator address."

View File

@ -210,7 +210,7 @@ class MockCoordinatorAgent(MockContractAgent):
# Read Calls - don't change state (only use copies of objects)
#
def is_provider_key_set(self, staking_provider: ChecksumAddress) -> bool:
def is_provider_public_key_set(self, staking_provider: ChecksumAddress) -> bool:
return staking_provider in self._participant_keys_history
def get_timeout(self) -> int: