-
Notifications
You must be signed in to change notification settings - Fork 292
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
add vmType check #1100
Conversation
@@ -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() |
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.
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() |
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.
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() |
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.
ditto
No description provided.