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 vmType check #1100

Merged
merged 10 commits into from
Oct 14, 2019
Merged

add vmType check #1100

merged 10 commits into from
Oct 14, 2019

Conversation

lucas7788
Copy link
Contributor

No description provided.

@@ -269,5 +269,5 @@ func (this *NeoVmService) getContract(address scommon.Address) ([]byte, error) {
if dep == nil {
return nil, CONTRACT_NOT_EXIST
}
return dep.Code, nil
return dep.GetNeoCode()
Copy link
Contributor

Choose a reason for hiding this comment

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

rename the function name to getNeoContract

@@ -79,11 +79,11 @@ func ContractCreate(proc *exec.Process,
panic(err)
}

if dep.VmType() != payload.WASMVM_TYPE {
panic("[Contract] expect WASMVM_TYPE. get NEOVM_TYPE")
wasmCode, err := dep.GetWasmCode()
Copy link
Contributor

Choose a reason for hiding this comment

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

rename needStorage to vmType

@@ -156,11 +156,11 @@ func ContractMigrate(proc *exec.Process,
panic(err)
}

if dep.VmType() != payload.WASMVM_TYPE {
panic("[Contract] expect WASMVM_TYPE. get NEOVM_TYPE")
wasmCode, err := dep.GetWasmCode()
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@laizy laizy merged commit b1bd061 into ontio:wasm-release Oct 14, 2019
@laizy laizy deleted the add_vmtype_check branch October 14, 2019 07:57
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.

None yet

2 participants