-
Notifications
You must be signed in to change notification settings - Fork 2
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
Stacked MMR #13
Stacked MMR #13
Conversation
FromStr implementation for TreeMetadataKeys
store: Rc<S>, | ||
key: String, | ||
pub struct InStoreCounter { | ||
pub store: Rc<dyn Store>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I check you change code from Rc<S>
to Rc<dyn Store>
. Which is from static dispatch to dynamic dispatch. I usually using dynamic dispatch only when it's cannot be determine during compile time ( because dynamic dispatch determine type during run time it takes more time ). In our case we can determine to have one store type per each mmr, is there any specific reason why you changed into dynamic dispatch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the store is dynamic because I want the flexibility in infinitely stackable mmr to provide any stores for any mmr
And also it's just a reference to the dyn Store it's not storing the store itself
No description provided.