1
0

getalias: no check

This commit is contained in:
ThomasV
2015-06-11 12:08:38 +02:00
parent e5b5e8d0f4
commit ba78093e2e
2 changed files with 18 additions and 12 deletions

View File

@@ -471,7 +471,7 @@ class Contacts(StoreDict):
def __init__(self, config):
StoreDict.__init__(self, config, 'contacts')
def resolve(self, k, nocheck=False):
def resolve(self, k):
if bitcoin.is_address(k):
return {'address':k, 'type':'address'}
if k in self.keys():
@@ -480,7 +480,5 @@ class Contacts(StoreDict):
return {'address':addr, 'type':'contact'}
out = run_hook('resolve_address', k)
if out:
if not nocheck and out.get('validated') is False:
raise Exception("cannot validate alias")
return out
raise Exception("invalid Bitcoin address", k)
raise Exception("Invalid Bitcoin address or alias", k)