coins: Raise Bitcoin version to 22.0

This commit is contained in:
tecnovert committed 2022-03-27 13:57:32 +02:00
1 parent 6b063d0582
commit 12bae95e7d
6 files changed
+57 -28

No files matched your search

+7 -2
View File
@@ -614,6 +614,11 @@ def find_vout_for_address(node, txid, addr):
"""
tx = node.getrawtransaction(txid, True)
for i in range(len(tx["vout"])):
if any([addr == a for a in tx["vout"][i]["scriptPubKey"]["addresses"]]):
return i
scriptPubKey = tx["vout"][i]["scriptPubKey"]
if "addresses" in scriptPubKey:
if any([addr == a for a in scriptPubKey["addresses"]]):
return i
elif "address" in scriptPubKey:
if addr == scriptPubKey["address"]:
return i
raise RuntimeError("Vout not found for address: txid=%s, addr=%s" % (txid, addr))