Have find_vout_for_address only get non-confidential address when using elements chain

This commit is contained in:
Andrew Chow 2019-10-15 15:06:19 -04:00
parent cefe40767d
commit ac6f052a6d

View file

@ -598,7 +598,9 @@ def find_vout_for_address(node, txid, addr):
given address. Raises runtime error exception if not found.
"""
tx = node.getrawtransaction(txid, True)
unblind_addr = node.validateaddress(addr)["unconfidential"]
unblind_addr = addr
if node.getblockchaininfo()['chain'] == 'elementsregtest':
unblind_addr = node.validateaddress(addr)["unconfidential"]
for i in range(len(tx["vout"])):
if tx["vout"][i]["scriptPubKey"]["type"] == "fee":
continue