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

Feature/missing host apis #1545

Merged
merged 6 commits into from
Mar 28, 2023
Merged

Feature/missing host apis #1545

merged 6 commits into from
Mar 28, 2023

Conversation

igor-egorov
Copy link
Contributor

Referenced issues

Resolves #1541

Description of the Change

Implement missing host apis.

  • ext_default_child_storage_clear_prefix_version_2: func (i64, i64, i64)->i64
  • ext_default_child_storage_root_version_2: func (i64, i32)->i64
  • ext_default_child_storage_storage_kill_version_3: func (i64, i64)->i64

Possible Drawbacks

clear_prefix_V1 and storage_kill_V1 could be rewritten to use V2 and V3 and reduce code duplication.

Igor Egorov added 4 commits March 26, 2023 12:28
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
* @param child_storage_key a pointer-size indicating the child storage key
* @param limit is an optional number of records to remove
* @param prefix a pointer-size indicating the prefix
* @return pointer to number of records removed
Copy link
Contributor

Choose a reason for hiding this comment

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

I see an enum in Rust, is it encoded to just the number of records?

prefix_buffer);

if (!result) {
logger_->error(
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we not abort the execution of this runtime call with an exception?

Igor Egorov added 2 commits March 28, 2023 14:12
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
@igor-egorov igor-egorov requested a review from Harrm March 28, 2023 11:13
@igor-egorov igor-egorov enabled auto-merge (squash) March 28, 2023 11:29
@igor-egorov igor-egorov merged commit da5a7e9 into master Mar 28, 2023
@igor-egorov igor-egorov deleted the feature/missing-host-apis branch March 28, 2023 12:18
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.

Implement missing child trie host apis
3 participants