-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Expose ckb-vm Error type directly in ScriptError
Previously we were converting ckb-vm Error type into a string, which makes it harder to inspect into ckb-vm Error for certain values. However, upon further checking, it seems that ckb's Error type can preserve enough information, so we don't always have to cast ckb-vm's Error type into a string. This commit fixes the code so we are preserving the original Error type from ckb-vm when we need it. For exsiting tests cases leveraging ckb_error::assert_error_eq, the code still passes without any modifications needed. A test case has also been added here, showcasing how we can destructing a ckb_error::Error type step by step, resulting in the inner-most ckb-vm's Error type.
- Loading branch information
Showing
6 changed files
with
89 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters