diff --git a/lbrynet/wallet/account.py b/lbrynet/wallet/account.py index d1886cebe..b50575725 100644 --- a/lbrynet/wallet/account.py +++ b/lbrynet/wallet/account.py @@ -89,9 +89,7 @@ class Account(BaseAccount): log.warning("Corrupt public:private key-pair: %s", str(e)) results['previous-corrupted'] += 1 - self.channel_keys.clear() - for key in new_channel_keys: - self.channel_keys[key] = new_channel_keys[key] + self.channel_keys = new_channel_keys self.wallet.save() log.info('verifying and possibly migrating certificates:') @@ -173,6 +171,5 @@ class Account(BaseAccount): def _get_pubkey_address_from_private_key_pem(self, private_key_pem): private_key = ecdsa.SigningKey.from_pem(private_key_pem, hashfunc=hashlib.sha256) - public_key_der = private_key.get_verifying_key().to_der() return self.ledger.public_key_to_address(public_key_der) diff --git a/lbrynet/wallet/network.py b/lbrynet/wallet/network.py index 432f56b48..59c1abf6e 100644 --- a/lbrynet/wallet/network.py +++ b/lbrynet/wallet/network.py @@ -1,5 +1,3 @@ -# temporary fix for https://github.com/PyCQA/pylint/issues/2820 -# pylint: disable=no-value-for-parameter from torba.client.basenetwork import BaseNetwork diff --git a/tests/integration/test_claim_commands.py b/tests/integration/test_claim_commands.py index ba77ba5b3..9e323bd11 100644 --- a/tests/integration/test_claim_commands.py +++ b/tests/integration/test_claim_commands.py @@ -300,7 +300,8 @@ class ChannelCommands(CommandTestCase): # send the private key too channel_pubkey_address_hash = self.account.ledger.public_key_to_address(unhexlify(channel['public_key'])) - account2.channel_keys[channel_pubkey_address_hash] = self.account.channel_keys[channel_pubkey_address_hash] + account2.add_channel_private_key('@featurechannel', channel_pubkey_address_hash, + self.account.channel_keys[channel_pubkey_address_hash]) # now should have private key txo = (await account2.get_channels())[0]