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: spv client cache #37

Merged
merged 3 commits into from
Jun 11, 2024
Merged

fix: spv client cache #37

merged 3 commits into from
Jun 11, 2024

Conversation

EthanYuan
Copy link
Collaborator

@EthanYuan EthanYuan commented May 20, 2024

issue from

A simple idea for a fix would be to get the latest spv instance over the network and update the cache as soon as a suitable spv client does not exist in the cache.

@EthanYuan EthanYuan requested review from jjyr and Flouse May 20, 2024 11:05
@jjyr
Copy link
Contributor

jjyr commented May 21, 2024

  1. Please explain which issue this PR addresses? Does the cache not invalidate properly?
  2. Can we handle cache invalidation in the load_spv_instance function? We can pass an argument last_accept_height: Option< usize > to indicate the lowest accepted height.

@EthanYuan EthanYuan force-pushed the fix-spv-client-cache branch 2 times, most recently from 1bb7c59 to 5b1f132 Compare May 21, 2024 11:11
@EthanYuan EthanYuan force-pushed the fix-spv-client-cache branch from 5b1f132 to aa27734 Compare May 21, 2024 11:12
@EthanYuan
Copy link
Collaborator Author

  1. Please explain which issue this PR addresses? Does the cache not invalidate properly?

I wrote issue here:

  1. Can we handle cache invalidation in the load_spv_instance function? We can pass an argument last_accept_height: Option< usize > to indicate the lowest accepted height.

Good idea. I've re-pushed the commit for review.

@Flouse Flouse merged commit 3b25270 into master Jun 11, 2024
5 checks passed
@Flouse Flouse deleted the fix-spv-client-cache branch June 11, 2024 07:53
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.

The spv instance cache not invalidate properly
3 participants