Skip to content
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

Merged
merged 2 commits into from
Jul 12, 2018
Merged

Add FAIL, SUCCESS opcode #378

merged 2 commits into from
Jul 12, 2018

Conversation

junbeomlee
Copy link
Contributor

Fixed #283

@sgkim126 sgkim126 requested review from joojis and remagpie and removed request for joojis July 11, 2018 12:57
@kseo
Copy link
Member

kseo commented Jul 11, 2018

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"}
Copy link
Contributor

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.

@junbeomlee
Copy link
Contributor Author

@kseo Thank you, i signed it!!
@Kais-DkM I've updated the commit so please check.

Copy link
Contributor

@remagpie remagpie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return type

@@ -36,6 +36,7 @@ impl Default for Config {

#[derive(Debug, PartialEq)]
pub enum ScriptResult {
Success,
Copy link
Contributor

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.

@@ -161,6 +162,8 @@ pub fn execute(
match &script[pc] {
Instruction::Nop => {}
Instruction::Burn => return Ok(ScriptResult::Burnt),
Instruction::Success => return Ok(ScriptResult::Success),
Copy link
Contributor

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.

remagpie
remagpie previously approved these changes Jul 12, 2018
@remagpie remagpie merged commit 34f2a2a into CodeChain-io:master Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants