Skip to content

Commit

Permalink
support multiple pubkeys in reserves file
Browse files Browse the repository at this point in the history
  • Loading branch information
shuckc committed Sep 1, 2023
1 parent 46f1fe1 commit f0eb1bf
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions validate_reserves.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,16 @@ def compile_proofs(rpc, proof):

elif addr_info["addr_type"] in ("wpkh"):
# check xpub, then we present descriptor as script
assert xpubs[0] in addr_info["script"]
descriptor = addr_info["script"]
for xp in xpubs:
if xp in addr_info["script"]:
descriptor = addr_info["script"]
break
else:
raise Exception(
"None of expected pubkeys found in descriptor {}".format(
addr_info["script"]
)
)
else:
raise Exception(
"Unknown address type {}".format(addr_info["addr_type"])
Expand Down

0 comments on commit f0eb1bf

Please sign in to comment.