MCPcopy Create free account
hub / github.com/ElementsProject/elements / descsum_create

Function descsum_create

test/functional/test_framework/descriptors.py:42–46  ·  view source on GitHub ↗

Add a checksum to a descriptor without

(s)

Source from the content-addressed store, hash-verified

40 return symbols
41
42def descsum_create(s):
43 """Add a checksum to a descriptor without"""
44 symbols = descsum_expand(s) + [0, 0, 0, 0, 0, 0, 0, 0]
45 checksum = descsum_polymod(symbols) ^ 1
46 return s + '#' + ''.join(CHECKSUM_CHARSET[(checksum >> (5 * (7 - i))) & 31] for i in range(8))
47
48def descsum_check(s, require=True):
49 """Verify that the checksum is correct in a descriptor"""

Callers 15

test_locked_walletMethod · 0.90
test_watchonlyMethod · 0.90
test_external_inputsMethod · 0.90
run_testMethod · 0.90
run_testMethod · 0.90
run_testMethod · 0.90
run_testMethod · 0.90
run_testMethod · 0.90
run_testMethod · 0.90
test_descMethod · 0.90
run_testMethod · 0.90
run_testMethod · 0.90

Calls 3

descsum_expandFunction · 0.70
descsum_polymodFunction · 0.70
joinMethod · 0.45

Tested by 8

test_locked_walletMethod · 0.72
test_watchonlyMethod · 0.72
test_external_inputsMethod · 0.72
test_descMethod · 0.72
test_descMethod · 0.72
importprivkeyMethod · 0.56
importpubkeyMethod · 0.56
importaddressMethod · 0.56