fixes issue 619, a bug in the regtest bitcoind utxo provider

This commit is contained in:
Aaron Blankstein
2017-09-26 11:13:02 -04:00
parent 44f93ad01d
commit 762e81c242
2 changed files with 121 additions and 4 deletions

View File

@@ -97,10 +97,12 @@ def get_unspents(address, blockchain_client):
addresses)
if constants.BLOCKSTACK_TESTNET and len(unspents) == 0:
bitcoind.importaddress(str(address))
unspents = bitcoind.listunspent(min_confirmations, max_confirmation,
addresses)
try:
bitcoind.importaddress(str(address))
unspents = bitcoind.listunspent(min_confirmations, max_confirmation,
addresses)
except Exception as e:
return format_unspents([])
return format_unspents(unspents)