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

Refactor chainstore and related components #809

Merged
merged 3 commits into from
Nov 9, 2020
Merged

Conversation

austinabell
Copy link
Contributor

Summary of changes
Changes introduced in this pull request:

  • A lot of functions were not using the StateManager or ChainStore, which was leading to incorrect behaviour in some cases, and also this allows us to build caching for these things to avoid unnecessary work

There should be no functional change from this, aside from fixing the incorrect behaviour that existed

Reference issue to close (if applicable)

Closes

Other information and links

Comment on lines +309 to +312
// TODO get tipset by height using cache instead of reloading tipsets
let mut ts_temp: Option<Tipset> = None;
loop {
let pts = if let Some(temp) = &ts_temp {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you use the tip_index.rs here to act as the cache? If not what ts cache would that be?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tip index is really broken right now and I'd rather not add any more usages until #814 is done. (I didn't change this code, just was moved)

@austinabell austinabell merged commit e1f1244 into main Nov 9, 2020
@austinabell austinabell deleted the austin/csrefactor branch November 9, 2020 14:47
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.

3 participants