1
0

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:
SomberNight
2019-12-09 03:43:47 +01:00
parent f73b6b5d23
commit 59c5efb090
2 changed files with 16 additions and 7 deletions

View File

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