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

Update StateTree and implement cache #108

Merged
merged 3 commits into from
Dec 16, 2019
Merged

Conversation

austinabell
Copy link
Contributor

@austinabell austinabell commented Dec 15, 2019

  • Spec changed and created an implementation of state tree

Edit: To give more detail, this HamtStateTree struct will be able to used by us as an interim solution until the hamt is built out. The caching part will stay the way it is now after getting and setting an acotor with the hamt is built out though.

How it works is for getting if the actor exists in the cache, it will not query the hamt for the actor, but if not then it will query the hamt and then add it to the cache. For setting, if the cache contains the actor state that is trying to be set it will exit early (why the nested Ok(())) and if not then the cache and hamt will be updated

@austinabell austinabell merged commit c916eb4 into master Dec 16, 2019
@austinabell austinabell deleted the austin/statetreeupd branch December 16, 2019 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants