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

Implement with_state_drain & with_state_at_drain #41

Open
mustermeiszer opened this issue Nov 17, 2022 · 0 comments
Open

Implement with_state_drain & with_state_at_drain #41

mustermeiszer opened this issue Nov 17, 2022 · 0 comments
Labels
I8-enhancement An additional feature. P0-someday-maybe Issue might be worth doing someday. Q3-medium Can be done with good experience in the language, but little knowledge of the codebase.

Comments

@mustermeiszer
Copy link
Collaborator

The method should allow using any state and return the respective storage changes of the closure afterwards.

API

fn with_state_drain(exec: F) -> Result<(R, StorageChanges), Error> 
    where F: FnOnce() -> R {}

fn with_state_at_drain(at: BlockId, exec: F) -> Result<(R, StorageChanges), Error> 
    where F: FnOnce() -> R {}
@mustermeiszer mustermeiszer added Q3-medium Can be done with good experience in the language, but little knowledge of the codebase. I8-enhancement An additional feature. P0-someday-maybe Issue might be worth doing someday. labels Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I8-enhancement An additional feature. P0-someday-maybe Issue might be worth doing someday. Q3-medium Can be done with good experience in the language, but little knowledge of the codebase.
Projects
None yet
Development

No branches or pull requests

1 participant