mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-24 03:45:38 +08:00
fixes issue 619, a bug in the regtest bitcoind utxo provider
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user