-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FAIL, SUCCESS opcode #378
Conversation
@junbeomlee You need to sign the CLA. https://www.clahub.com/agreements/CodeChain-io/codechain |
vm/Cargo.toml
Outdated
@@ -7,7 +7,7 @@ authors = ["CodeChain Team <codechain@kodebox.io>"] | |||
|
|||
[dependencies] | |||
codechain-crypto = { path = "../crypto" } | |||
codechain-key = { path = "../key" } | |||
codechain-key = { path = "../key"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't need to be changed.
@kseo Thank you, i signed it!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return type
vm/src/executor.rs
Outdated
@@ -36,6 +36,7 @@ impl Default for Config { | |||
|
|||
#[derive(Debug, PartialEq)] | |||
pub enum ScriptResult { | |||
Success, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need additional result type. Unlocked
means Success
.
vm/src/executor.rs
Outdated
@@ -161,6 +162,8 @@ pub fn execute( | |||
match &script[pc] { | |||
Instruction::Nop => {} | |||
Instruction::Burn => return Ok(ScriptResult::Burnt), | |||
Instruction::Success => return Ok(ScriptResult::Success), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return Unlocked
instead of Success
.
Fixed #283