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

Review Host callbacks return types #117

Closed
1 task
chfast opened this issue Aug 30, 2018 · 3 comments
Closed
1 task

Review Host callbacks return types #117

chfast opened this issue Aug 30, 2018 · 3 comments
Assignees

Comments

@chfast
Copy link
Member

chfast commented Aug 30, 2018

  • get_balance(), get_code_size(), get_code_hash().
    This should not return int to inform if an account exists. It would make it unnecessary complicated and a VM usually does not care (a contract might, but usually don't).
@axic
Copy link
Member

axic commented Sep 5, 2018

get_balance(), get_code_size(), get_code_hash().
This should not return int to inform if an account exists. It would make it unnecessary complicated and a VM usually does not care (a contract might, but usually don't).

Based on the latest discussions it makes sense to keep these returning a boolean, just like get_block_hash is working, but with a slight change: if it returns false, it should not modify the supplied result pointer.

@axic
Copy link
Member

axic commented Sep 5, 2018

The same should apply to get_storage/set_storage.

@chfast
Copy link
Member Author

chfast commented Sep 6, 2018

Handle set_storage and get_storage separately in #146.

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

No branches or pull requests

2 participants