diff --git a/chia/wallet/puzzles/condition_codes.clib b/chia/wallet/puzzles/condition_codes.clib index 386036fb62a6..19f4d3164b6e 100644 --- a/chia/wallet/puzzles/condition_codes.clib +++ b/chia/wallet/puzzles/condition_codes.clib @@ -1,6 +1,16 @@ ; See chia/types/condition_opcodes.py ( + + ; Unavailable until after 2.0 hard fork + (defconstant AGG_SIG_PARENT 43) + (defconstant AGG_SIG_PUZZLE 44) + (defconstant AGG_SIG_AMOUNT 45) + (defconstant AGG_SIG_PUZZLE_AMOUNT 46) + (defconstant AGG_SIG_PARENT_AMOUNT 47) + (defconstant AGG_SIG_PARENT_PUZZLE 48) + ; + (defconstant AGG_SIG_UNSAFE 49) (defconstant AGG_SIG_ME 50) diff --git a/tests/clvm/test_condition_codes.py b/tests/clvm/test_condition_codes.py new file mode 100644 index 000000000000..ac64edd8e0e6 --- /dev/null +++ b/tests/clvm/test_condition_codes.py @@ -0,0 +1,13 @@ +from __future__ import annotations + +import pkg_resources +from clvm.casts import int_from_bytes + +from chia.types.condition_opcodes import ConditionOpcode + + +def test_condition_codes_is_complete() -> None: + with open(pkg_resources.resource_filename("chia.wallet.puzzles", "condition_codes.clib")) as f: + contents: str = f.read() + for name, value in ConditionOpcode.__members__.items(): + assert f"(defconstant {name} {int_from_bytes(value)})" in contents