perf: Optimize synchronization logic for multiple wallets in the light client.#3160
Merged
yanguoyu merged 2 commits intonervosnetwork:developfrom May 28, 2024
Merged
Conversation
Keith-CY
reviewed
May 21, 2024
packages/neuron-wallet/src/block-sync-renderer/sync/light-synchronizer.ts
Outdated
Show resolved
Hide resolved
packages/neuron-wallet/src/block-sync-renderer/sync/light-synchronizer.ts
Outdated
Show resolved
Hide resolved
devchenyan
approved these changes
May 21, 2024
Keith-CY
approved these changes
May 21, 2024
|
/package |
|
This pr means that when I change to wallet which block height is bigger than the current wallet and sync for a while,the lower wallet block height will sync also?I can not see this effect.This is my operation video. |
Contributor
Author
You may have misunderstood. When the current wallet synced block number is lower, after this current wallet reaches the other higher wallet's synced block height, they will sync simultaneously. |
silySuper
approved these changes
May 28, 2024
yanguoyu
added a commit
to yanguoyu/neuron
that referenced
this pull request
May 29, 2024
…t client. (nervosnetwork#3160) perf: Optimize synchronization logic for multiple wallets in a light client node Co-authored-by: Chen Yu <keithwhisper@gmail.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refer to Magickbase/neuron-public-issues#352
I added a threshold for different wallets that can sync simultaneously. If the block number difference between the synchronization block number of other wallets and the current wallet block number is not less than this threshold value, they can be synchronized together.