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

Function big_spend_inputs

test/functional/feature_taproot.py:923–931  ·  view source on GitHub ↗

Helper function to construct the script input for t33/t34 below.

(ctx)

Source from the content-addressed store, hash-verified

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 = [

Callers

nothing calls this directly

Calls 2

overrideFunction · 0.85
getFunction · 0.85

Tested by

no test coverage detected