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

Function renamings in state api interface + improved documentation #448

Merged
merged 10 commits into from
Feb 10, 2023

Conversation

masapr
Copy link
Collaborator

@masapr masapr commented Feb 8, 2023

@haerdib can you check if these are the renamings you had in mind in #412

closes #412

@masapr masapr requested a review from haerdib February 8, 2023 08:14
src/api/rpc_api/state.rs Show resolved Hide resolved
src/api/rpc_api/state.rs Outdated Show resolved Hide resolved
src/api/rpc_api/state.rs Outdated Show resolved Hide resolved
node-api/src/metadata.rs Outdated Show resolved Hide resolved
src/api/rpc_api/state.rs Outdated Show resolved Hide resolved
@masapr masapr marked this pull request as ready for review February 8, 2023 13:41
@masapr masapr added F5-refactor Does not change any functionality of the code E2-breaksapi labels Feb 8, 2023
@masapr masapr changed the title Sp/412 cleanup get storage Renamings in state api + added comments Feb 8, 2023
@masapr masapr changed the title Renamings in state api + added comments Function renamings in state api interface + improved documentation Feb 8, 2023
Copy link
Contributor

@haerdib haerdib left a comment

Choose a reason for hiding this comment

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

Looking forward to the clearer interface ! Thanks for your effort ❤️

src/api/rpc_api/state.rs Outdated Show resolved Hide resolved
src/api/rpc_api/state.rs Outdated Show resolved Hide resolved
/// Retrieve the raw storage for the given `storage_key`.
///
/// `at_block`: the state is queried at this block, set to `None` to get the state from the latest known block.
fn get_opaque_storage(
Copy link
Contributor

Choose a reason for hiding this comment

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

Above, the _by_key is used whenever a storage key is required as an input. If there's no by_key, then the pallet and storage item are required. Is this convention break here intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for this observation. Will change it.

@masapr masapr requested a review from haerdib February 10, 2023 10:46
Copy link
Contributor

@haerdib haerdib left a comment

Choose a reason for hiding this comment

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

Awesome, thanks alot!

@masapr masapr merged commit b140271 into master Feb 10, 2023
@masapr masapr deleted the sp/412-cleanup-get-storage branch February 10, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2-breaksapi F5-refactor Does not change any functionality of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up GetStorage
2 participants