diff --git a/quickcheck/aefate_code_eqc.erl b/quickcheck/aefate_code_eqc.erl index 416fce5..1aedfbd 100644 --- a/quickcheck/aefate_code_eqc.erl +++ b/quickcheck/aefate_code_eqc.erl @@ -77,7 +77,7 @@ prop_opcodes() -> valid_opcodes() -> - lists:seq(0, 16#a0) ++ lists:seq(16#fa, 16#fd). + [ Op || #{opcode := Op} <- aeb_fate_generate_ops:get_ops() ]. fate_code(Failure) -> diff --git a/src/aeb_fate_generate_ops.erl b/src/aeb_fate_generate_ops.erl index 4adf9e8..26c511c 100644 --- a/src/aeb_fate_generate_ops.erl +++ b/src/aeb_fate_generate_ops.erl @@ -220,6 +220,8 @@ ops_defs() -> , { 'CHAR_TO_INT', 16#a0, false, true, true, 10, [a,a], char_to_int, {char}, int, "Arg0 := integer representation of UTF-8 character"} , { 'CHAR_FROM_INT', 16#a1, false, true, true, 10, [a,a], char_from_int, {int}, variant, "Arg0 := Some(UTF-8 character) from integer if valid, None if not valid."} + , { 'CALL_PGR', 16#a2, true, false, true, 100, [a,is,a,a,a,a,a], call_pgr, {contract, string, typerep, typerep, integer, integer, bool}, variant, "Potentially protected remote call. Arg5 is protected flag, otherwise as CALL_GR."} + , { 'DEACTIVATE', 16#fa, false, true, true, 10, [], deactivate, {}, none, "Mark the current contract for deactivation."} , { 'ABORT', 16#fb, true, true, true, 10, [a], abort, {string}, none, "Abort execution (dont use all gas) with error message in Arg0."} , { 'EXIT', 16#fc, true, true, true, 10, [a], exit, {string}, none, "Abort execution (use upp all gas) with error message in Arg0."} diff --git a/src/aeb_fate_maps.erl b/src/aeb_fate_maps.erl index e57831d..59f2a88 100644 --- a/src/aeb_fate_maps.erl +++ b/src/aeb_fate_maps.erl @@ -25,7 +25,11 @@ %% Size in bytes of serialization of a map for which we turn it into a store %% map. It's not worth turning small maps into store maps. %% Under consensus! +-ifdef(TEST). +-define(STORE_MAP_THRESHOLD, 0). +-else. -define(STORE_MAP_THRESHOLD, 100). +-endif. -type fate_value() :: aeb_fate_data:fate_type(). -type fate_value_or_tombstone() :: fate_value() | ?FATE_MAP_TOMBSTONE.