mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-02 18:25:21 +00:00
fix is_valid
This commit is contained in:
parent
6b5a2b98d2
commit
68bfce07c1
1 changed files with 4 additions and 1 deletions
|
@ -399,7 +399,10 @@ class Wallet:
|
|||
def is_valid(self,addr):
|
||||
ADDRESS_RE = re.compile('[1-9A-HJ-NP-Za-km-z]{26,}\\Z')
|
||||
if not ADDRESS_RE.match(addr): return False
|
||||
h = bc_address_to_hash_160(addr)
|
||||
try:
|
||||
h = bc_address_to_hash_160(addr)
|
||||
except:
|
||||
return False
|
||||
return addr == hash_160_to_bc_address(h)
|
||||
|
||||
def stretch_key(self,seed):
|
||||
|
|
Loading…
Add table
Reference in a new issue