utxostack / ckb-bitcoin-spv-service

Synchronize headers to Bitcoin SPV clients running on the CKB chain.
MIT License
1 stars 4 forks source link

fix: spv client cache #37

Closed EthanYuan closed 3 months ago

EthanYuan commented 4 months ago

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.

jjyr commented 4 months ago
  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 commented 4 months ago
  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.