tfix: replace remaining occurences of public_key_to_bc_address - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 6bfbc9a718b938d239932a5ca6bc912fdec28f51 DIR parent f937472928a641cba55e8e9767802086374e58c2 HTML Author: ThomasV <thomasv@electrum.org> Date: Sun, 29 Jan 2017 06:34:35 +0100 fix: replace remaining occurences of public_key_to_bc_address Diffstat: M lib/bitcoin.py | 4 ++-- M lib/transaction.py | 2 +- M lib/wallet.py | 2 +- M plugins/trezor/plugin.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) --- DIR diff --git a/lib/bitcoin.py b/lib/bitcoin.py t@@ -404,7 +404,7 @@ def public_key_from_private_key(sec): def address_from_private_key(sec): public_key = public_key_from_private_key(sec) - address = public_key_to_bc_address(public_key.decode('hex')) + address = public_key_to_p2pkh(public_key.decode('hex')) return address t@@ -470,7 +470,7 @@ def verify_message(address, sig, message): public_key, compressed = pubkey_from_signature(sig, message) # check public key using the address pubkey = point_to_ser(public_key.pubkey.point, compressed) - addr = public_key_to_bc_address(pubkey) + addr = public_key_to_p2pkh(pubkey) if address != addr: raise Exception("Bad signature") # check message DIR diff --git a/lib/transaction.py b/lib/transaction.py t@@ -820,7 +820,7 @@ class Transaction: if type == TYPE_ADDRESS: addr = x elif type == TYPE_PUBKEY: - addr = public_key_to_bc_address(x.decode('hex')) + addr = bitcoin.public_key_to_p2pkh(x.decode('hex')) else: addr = 'SCRIPT ' + x.encode('hex') o.append((addr,v)) # consider using yield (addr, v) DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -619,7 +619,7 @@ class Abstract_Wallet(PrintError): if _type == TYPE_ADDRESS: addr = x elif _type == TYPE_PUBKEY: - addr = public_key_to_bc_address(x.decode('hex')) + addr = bitcoin.public_key_to_p2pkh(x.decode('hex')) else: addr = None if addr and self.is_mine(addr): DIR diff --git a/plugins/trezor/plugin.py b/plugins/trezor/plugin.py t@@ -6,7 +6,7 @@ from binascii import hexlify, unhexlify from functools import partial from electrum.bitcoin import (bc_address_to_hash_160, xpub_from_pubkey, - public_key_to_bc_address, EncodeBase58Check, + public_key_to_p2pkh, EncodeBase58Check, TYPE_ADDRESS, TYPE_SCRIPT) from electrum.i18n import _ from electrum.plugins import BasePlugin, hook t@@ -29,7 +29,7 @@ class TrezorCompatibleKeyStore(Hardware_KeyStore): def decrypt_message(self, pubkey, message, password): raise RuntimeError(_('Electrum and %s encryption and decryption are currently incompatible') % self.device) - address = public_key_to_bc_address(pubkey.decode('hex')) + address = public_key_to_p2pkh(pubkey.decode('hex')) client = self.get_client() address_path = self.address_id(address) address_n = client.expand_path(address_path)