keystore: cache BIP32Node.from_xkey(self.xpub)
This results in significant performance improvements for keystore.can_sign() and wallet._add_txinout_derivation_info()
This commit is contained in:
@@ -273,6 +273,7 @@ class BIP32Node(NamedTuple):
|
||||
"""Returns the fingerprint of this node.
|
||||
Note that self.fingerprint is of the *parent*.
|
||||
"""
|
||||
# TODO cache this
|
||||
return hash_160(self.eckey.get_public_key_bytes(compressed=True))[0:4]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user