Helper function to construct the script input for t33/t34 below.
(ctx)
| 921 | |
| 922 | |
| 923 | def big_spend_inputs(ctx): |
| 924 | """Helper function to construct the script input for t33/t34 below.""" |
| 925 | # Instead of signing 999 times, precompute signatures for every (key, hashtype) combination |
| 926 | sigs = {} |
| 927 | for ht in VALID_SIGHASHES_TAPROOT: |
| 928 | for k in range(len(pubs)): |
| 929 | sigs[(k, ht)] = override(default_sign, hashtype=ht, key=secs[k])(ctx) |
| 930 | num = get(ctx, "num") |
| 931 | return [sigs[(big_choices[i], random.choice(VALID_SIGHASHES_TAPROOT))] for i in range(num - 1, -1, -1)] |
| 932 | |
| 933 | # Various BIP342 features |
| 934 | scripts = [ |