From 76b04386a05d975ca67367131138e8f372b67ac6 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Tue, 29 Oct 2024 16:03:14 +0800 Subject: [PATCH] let ckb_vm::Error::External("stopped") return ErrorKind::Internal instead of ErrorKind::Script --- script/src/error.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/src/error.rs b/script/src/error.rs index cac50b738d..094671d6e3 100644 --- a/script/src/error.rs +++ b/script/src/error.rs @@ -182,7 +182,12 @@ impl ScriptError { impl From for Error { fn from(error: TransactionScriptError) -> Self { - ErrorKind::Script.because(error) + match error.cause { + ScriptError::Other(ref reason) if reason == "stopped" => { + ErrorKind::Internal.because(error) + } + _ => ErrorKind::Script.because(error), + } } }