Add getdescriptorinfo to compute checksum

This commit is contained in:
Pieter Wuille
2019-02-07 15:09:08 -08:00
parent 3b40bff988
commit b52cb63688
2 changed files with 43 additions and 0 deletions

View File

@@ -175,6 +175,8 @@ class AddressTypeTest(BitcoinTestFramework):
assert(descsum_check(info['desc']))
# Verify that stripping the checksum and recreating it using Python roundtrips
assert(info['desc'] == descsum_create(info['desc'][:-9]))
# Verify that stripping the checksum and feeding it to getdescriptorinfo roundtrips
assert(info['desc'] == self.nodes[0].getdescriptorinfo(info['desc'][:-9])['descriptor'])
if not multisig and typ == 'legacy':
# P2PKH