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

Maybe we need to add states for data #510

Open
Daryl-L opened this issue Oct 12, 2023 · 2 comments
Open

Maybe we need to add states for data #510

Daryl-L opened this issue Oct 12, 2023 · 2 comments

Comments

@Daryl-L
Copy link
Contributor

Daryl-L commented Oct 12, 2023

Data doesn't exists when being loaded from block chain is too weird to understand for freash developers. I think we need to provide some states to distinguish. I think maybe like as follow.

enum LoadingStates {
  Fresh = 0;
  Loading;
  Loaded;
  NotExist;
}
@yanguoyu
Copy link
Contributor

Do you mean for the first load of the model, we'd wait for some time then the data would be okay?
It's a good idea to tell the developer the model sync status, and it will be better to add a variable for the store model that stores the current sync block number.

@Daryl-L
Copy link
Contributor Author

Daryl-L commented Oct 12, 2023

Do you mean for the first load of the model, we'd wait for some time then the data would be okay? It's a good idea to tell the developer the model sync status, and it will be better to add a variable for the store model that stores the current sync block number.

Yes, that's what I mean~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants