diff --git a/c/omni_lock_time_lock.h b/c/omni_lock_time_lock.h index 1b78789..357f83e 100644 --- a/c/omni_lock_time_lock.h +++ b/c/omni_lock_time_lock.h @@ -2,6 +2,7 @@ #define OMNI_LOCK_TIME_LOCK_H_ #include "ckb_utils.h" +#define ERROR_INCORRECT_SINCE_FLAGS (-23) #define ERROR_INCORRECT_SINCE_VALUE (-24) /* check since, @@ -27,7 +28,7 @@ int check_since(uint64_t since) { int comparable = 1; int cmp = ckb_since_cmp(since, input_since, &comparable); if (!comparable) { - return ERROR_INCORRECT_SINCE_VALUE; + return ERROR_INCORRECT_SINCE_FLAGS; } if (cmp == 1) { return ERROR_INCORRECT_SINCE_VALUE; diff --git a/tests/omni_lock_rust/tests/test_multisig.rs b/tests/omni_lock_rust/tests/test_multisig.rs index 378abeb..1041992 100644 --- a/tests/omni_lock_rust/tests/test_multisig.rs +++ b/tests/omni_lock_rust/tests/test_multisig.rs @@ -371,7 +371,7 @@ fn test_multisig_0_2_3_unlock_with_since_relative_not_comparable() { let mut verifier = verify_tx(resolved_tx, data_loader); verifier.set_debug_printer(debug_printer); let verify_result = verifier.verify(MAX_CYCLES); - assert_script_error(verify_result.unwrap_err(), ERROR_INCORRECT_SINCE_VALUE) + assert_script_error(verify_result.unwrap_err(), ERROR_INCORRECT_SINCE_FLAGS) } #[test] @@ -390,7 +390,7 @@ fn test_multisig_0_2_3_unlock_with_since_flags() { let mut verifier = verify_tx(resolved_tx, data_loader); verifier.set_debug_printer(debug_printer); let verify_result = verifier.verify(MAX_CYCLES); - assert_script_error(verify_result.unwrap_err(), ERROR_INCORRECT_SINCE_VALUE) + assert_script_error(verify_result.unwrap_err(), ERROR_INCORRECT_SINCE_FLAGS) } #[test] @@ -434,7 +434,7 @@ fn test_multisig_0_2_3_unlock_with_since_epoch() { let mut verifier = verify_tx(resolved_tx, data_loader); verifier.set_debug_printer(debug_printer); let verify_result = verifier.verify(MAX_CYCLES); - assert_script_error(verify_result.unwrap_err(), ERROR_INCORRECT_SINCE_VALUE) + assert_script_error(verify_result.unwrap_err(), ERROR_INCORRECT_SINCE_FLAGS) } #[test]