Skip to content

Commit

Permalink
Update regex for bircoin v26 (use h instead of single quote for harde…
Browse files Browse the repository at this point in the history
…ned paths)
  • Loading branch information
fmhoeger committed Dec 31, 2023
1 parent 87d7d10 commit 175658e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ def test_rpc_list(bitcoind, ln_node):
)

regex_ns_d = (
r"^wpkh\(\[[a-f0-9]{8}\/84'\/1'\/0'\]tpub[a-zA-Z0-9]{107}\/0\/\*\)#[a-z0-9]{8}$"
r"^wpkh\(\[[a-f0-9]{8}\/84h\/1h\/0h\]tpub[a-zA-Z0-9]{107}\/0\/\*\)#[a-z0-9]{8}$"
)
regex_ns_cd = (
r"^wpkh\(\[[a-f0-9]{8}\/84'\/1'\/0'\]tpub[a-zA-Z0-9]{107}\/1\/\*\)#[a-z0-9]{8}$"
r"^wpkh\(\[[a-f0-9]{8}\/84h\/1h\/0h\]tpub[a-zA-Z0-9]{107}\/1\/\*\)#[a-z0-9]{8}$"
)
regex_tr_d = (
r"^tr\(\[[a-f0-9]{8}\/86'\/1'\/0'\]tpub[a-zA-Z0-9]{107}\/0\/\*\)#[a-z0-9]{8}$"
r"^tr\(\[[a-f0-9]{8}\/86h\/1h\/0h\]tpub[a-zA-Z0-9]{107}\/0\/\*\)#[a-z0-9]{8}$"
)
regex_tr_cd = (
r"^tr\(\[[a-f0-9]{8}\/86'\/1'\/0'\]tpub[a-zA-Z0-9]{107}\/1\/\*\)#[a-z0-9]{8}$"
r"^tr\(\[[a-f0-9]{8}\/86h\/1h\/0h\]tpub[a-zA-Z0-9]{107}\/1\/\*\)#[a-z0-9]{8}$"
)
assert re.search(regex_ns_d, smaug_wallet_1["descriptor"]) is not None
assert re.search(regex_ns_cd, smaug_wallet_1["change_descriptor"]) is not None
Expand Down

0 comments on commit 175658e

Please sign in to comment.