Skip to content

Commit d0625e1

Browse files
committed
Add taproot address parsing test case, regression test for #1181.
1 parent 6b4228e commit d0625e1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/functional/wallet_address_types.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,5 +398,13 @@ def run_test(self):
398398
info2 = self.nodes[0].getaddressinfo(self.nodes[0].getrawchangeaddress("blech32"))
399399
assert(len(info2["confidential_key"]) > 0)
400400

401+
# taproot (segwit v1) address parsing test
402+
# We will use a hardcoded placeholder for now, until we can have the test use the wallet to generate one.
403+
# This functions as a regression test for #1181.
404+
tap_addr = "el1pqwp9ze75659cn5ad0hw25nt2kv7j882gudn636hnh4qvjcmjh6jq5ca0d4cgl009m5rn5w0n3k2cqa3ths2qf7s8q6x2xplwgvlfhg0atxwjah9089tf"
405+
info3 = self.nodes[0].getaddressinfo(tap_addr)
406+
assert_equal(tap_addr, info3["address"])
407+
assert(len(info3["confidential_key"]) > 0)
408+
401409
if __name__ == '__main__':
402410
AddressTypeTest().main()

0 commit comments

Comments
 (0)