mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
optimise wallet.is_mine
This commit is contained in:
parent
7f3b627aa4
commit
1c67cfe01b
1 changed files with 4 additions and 0 deletions
|
@ -332,6 +332,10 @@ class Abstract_Wallet(PrintError):
|
||||||
return changed
|
return changed
|
||||||
|
|
||||||
def is_mine(self, address):
|
def is_mine(self, address):
|
||||||
|
if hasattr(self, '_addr_to_addr_index'): # Deterministic_Wallet
|
||||||
|
return address in self._addr_to_addr_index
|
||||||
|
if hasattr(self, 'addresses'): # Imported_Wallet
|
||||||
|
return address in self.addresses
|
||||||
return address in self.get_addresses()
|
return address in self.get_addresses()
|
||||||
|
|
||||||
def is_change(self, address):
|
def is_change(self, address):
|
||||||
|
|
Loading…
Add table
Reference in a new issue