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

fix: fix sync on new blocks #163

Merged
merged 4 commits into from
Feb 27, 2023
Merged

fix: fix sync on new blocks #163

merged 4 commits into from
Feb 27, 2023

Conversation

Keith-CY
Copy link
Member

@Keith-CY Keith-CY commented Feb 26, 2023

  1. fix sync on new blocks. In the previous logic, registryOutPoint maps to a single model(https://github.com/ckb-js/kuai/pull/163/files#diff-6beced91eeabe7f90f6b66349a7a50e5a2e7cac2c73c536c6c32131c8082ddcdL21), which leads to that changes will only be sent to a single model instead of all models matched by the outPoint, so only one model will be updated(https://github.com/ckb-js/kuai/pull/163/files#diff-6beced91eeabe7f90f6b66349a7a50e5a2e7cac2c73c536c6c32131c8082ddcdL147) correctly. This PR maps registryOutPoint to a set of models to make sure they are all updated by the changes;
  2. add a load method in the store model, which returns the global state combined from various cells matched in the store.

1. fix sync on new blocks
2. add a load method in store model
@Keith-CY Keith-CY merged commit 89bc81f into develop Feb 27, 2023
@Keith-CY Keith-CY deleted the fix-sync-on-new-block branch February 27, 2023 06:06
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

Successfully merging this pull request may close these issues.

4 participants