Small fixes for web3==5.0.0a8

pull/812/head
Kieran Prasch 2019-03-21 17:55:31 -07:00
parent fbb04559f5
commit 2fbda80d38
No known key found for this signature in database
GPG Key ID: 199AB839D4125A62
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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):

View File

@ -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)