-
Notifications
You must be signed in to change notification settings - Fork 1
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 gas host call #303
Add gas host call #303
Conversation
✅ Deploy Preview for pvm-debugger ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
lgtm
@@ -165,6 +165,12 @@ const hostCall = async ({ | |||
await jamHostCall.execute(getGasCounter(pvm), getRegisters(pvm), getMemory(pvm)); | |||
|
|||
return { hostCallIdentifier, storage, status: CommandStatus.SUCCESS }; | |||
} else if (hostCallIdentifier === HostCallIdentifiers.GAS) { |
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.
Take a look at this code it's doing exactly the thing that you are doing here with a series of if-elses and handles a missing host call by returning some info back to the PVM.
You might consider using this instead.
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.
Interesting, I'll take some pieces from this when working on the import/export host calls.
No description provided.