def worker_address(self) -> str: if self.__worker_address: return self.__worker_address else: worker_address = self.staking_agent.get_worker_from_staker(staker_address=self.checksum_address) self.__worker_address = worker_address if self.__worker_address == BlockchainInterface.NULL_ADDRESS: return NO_WORKER_ASSIGNED.bool_value(False) return self.__worker_address
def worker_address(self) -> str: if self.__worker_address: # TODO: This is broken for StakeHolder with different stakers - See #1358 return self.__worker_address else: worker_address = self.staking_agent.get_worker_from_staker(staker_address=self.checksum_address) self.__worker_address = worker_address if self.__worker_address == BlockchainInterface.NULL_ADDRESS: return NO_WORKER_ASSIGNED.bool_value(False) return self.__worker_address