diff --git a/nucypher/characters/unlawful.py b/nucypher/characters/unlawful.py index b4715e3e7..62461418f 100644 --- a/nucypher/characters/unlawful.py +++ b/nucypher/characters/unlawful.py @@ -72,14 +72,14 @@ class Vladimir(Ursula): @classmethod def attach_transacting_key(cls, blockchain): """ - Upload Vladimir's ETH keys to the keychain via web3 / RPC. + Upload Vladimir's ETH keys to the keychain via web3. """ try: password = INSECURE_DEVELOPMENT_PASSWORD - blockchain.interface.w3.personal.importRawKey(private_key=cls.fraud_key, passphrase=password) + blockchain.interface.w3.provider.ethereum_tester.add_account(cls.fraud_key, password=password) except (ValidationError, ): # check if Vlad's key is already on the keyring... - if cls.fraud_address in blockchain.interface.w3.personal.listAccounts: + if cls.fraud_address in blockchain.interface.w3.eth.accounts: return True else: raise diff --git a/nucypher/crypto/powers.py b/nucypher/crypto/powers.py index a590b4341..39198470b 100644 --- a/nucypher/crypto/powers.py +++ b/nucypher/crypto/powers.py @@ -141,7 +141,7 @@ class BlockchainPower(CryptoPowerUp): """ Deletes the blockchain power and locks the account. """ - self.blockchain.interface.w3.personal.lockAccount(self.account) + # self.blockchain.interface.w3.personal.lockAccount(self.account) # TODO: Implement client support class KeyPairBasedPower(CryptoPowerUp): diff --git a/nucypher/network/server.py b/nucypher/network/server.py index e013e9a3b..7a05e793a 100644 --- a/nucypher/network/server.py +++ b/nucypher/network/server.py @@ -193,7 +193,7 @@ def make_rest_app( # TODO: Include data about caller? # TODO: Account for possibility that stamp, rather than interface, was bad. # TODO: Maybe also record the bytes representation separately to disk? - message = "Suspicious Activity: Discovered node with bad signature: {}. Announced via REST." + message = f"Suspicious Activity: Discovered node with bad signature: {node}. Announced via REST." log.warn(message) suspicious_activity_tracker['vladimirs'].append(node)