Magickbase / neuron-public-issues

Neuron Issues
6 stars 3 forks source link

Optimize light sync sync logic #352

Open yanguoyu opened 8 months ago

yanguoyu commented 8 months ago

This is an optimization from discord https://discord.com/channels/956765352514183188/958262323397689354/1191544570048151623. Currently, for the light client, every wallet has its sync progress, and when we switch to another wallet, the last choose wallet subscribe lock scripts will stop subscribing.

We can optimize the logic by only removing the lock scripts that the sync block number is less than the current min synced block number. Then if all of the wallets synced to the same block number, when we switch to another wallet, other wallets will continue to sync and not break the current wallet sync.

yanguoyu commented 4 months ago

https://github.com/nervosnetwork/neuron/pull/3160