diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-11-16 14:40:19 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-01-29 14:48:37 +0100 |
commit | cccc1e70b8a14430cc94143da97936a60d6c83d3 (patch) | |
tree | c28482c21587e74823811b914990558217ca3408 /test/functional | |
parent | fa422994116a7a053789304d56159760081479eb (diff) |
Enforce Taproot script flags whenever WITNESS is set
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/feature_taproot.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/functional/feature_taproot.py b/test/functional/feature_taproot.py index e9da6edaf6..1da48b77a6 100755 --- a/test/functional/feature_taproot.py +++ b/test/functional/feature_taproot.py @@ -1181,15 +1181,11 @@ def spenders_taproot_inactive(): ] tap = taproot_construct(pub, scripts) - # Test that keypath spending is valid & non-standard, regardless of validity. + # Test that valid spending is standard. add_spender(spenders, "inactive/keypath_valid", key=sec, tap=tap, standard=Standard.V23) - add_spender(spenders, "inactive/keypath_invalidsig", key=sec, tap=tap, standard=False, sighash=bitflipper(default_sighash)) - add_spender(spenders, "inactive/keypath_empty", key=sec, tap=tap, standard=False, witness=[]) - - # Same for scriptpath spending (and features like annex, leaf versions, or OP_SUCCESS don't change this) add_spender(spenders, "inactive/scriptpath_valid", key=sec, tap=tap, leaf="pk", standard=Standard.V23, inputs=[getter("sign")]) - add_spender(spenders, "inactive/scriptpath_invalidsig", key=sec, tap=tap, leaf="pk", standard=False, inputs=[getter("sign")], sighash=bitflipper(default_sighash)) - add_spender(spenders, "inactive/scriptpath_invalidcb", key=sec, tap=tap, leaf="pk", standard=False, inputs=[getter("sign")], controlblock=bitflipper(default_controlblock)) + + # Test that features like annex, leaf versions, or OP_SUCCESS are valid but non-standard add_spender(spenders, "inactive/scriptpath_valid_unkleaf", key=sec, tap=tap, leaf="future_leaf", standard=False, inputs=[getter("sign")]) add_spender(spenders, "inactive/scriptpath_invalid_unkleaf", key=sec, tap=tap, leaf="future_leaf", standard=False, inputs=[getter("sign")], sighash=bitflipper(default_sighash)) add_spender(spenders, "inactive/scriptpath_valid_opsuccess", key=sec, tap=tap, leaf="op_success", standard=False, inputs=[getter("sign")]) |