HomePhabricator

[Cashtab] fix stale cached data

Description

[Cashtab] fix stale cached data

Summary:

  1. Uncofirmed Transaction
  2. Unconfirmed tx has blocktime set to "undefined"
  3. Cashtab shows unconfirmed tx as being created "Today"
  4. Caching unconfirmed tx with CacheFirst strategy will cause the tx to always shown as "Today"
  5. This fix make sure that only confirmed txs are cached.
  1. SLP Token Stats
  2. SLP Token Stats (totalMinted, totalBurned) is specific to a particular moment in time. It does not make sense to cache them
  3. This fix remove the caching of SLP Token Stats
  1. Removing old caches
  2. simply changing the suffix to 'v1.0.1' will discard the old caches

Test Plan:

  • cd web/cashtab
  • npm start
  • navigate to localhost:3000
  • check that the following caches are created:

+ cashtab-static-assets-v1.0.1
+ cashtab-tx-data-v1.0.1
+ cashtab-slp-tx-data-v1.0.1 (if you have token tx)

  • send some XECs and Tokens
  • inspect the caches to verify that unconfirmed txs are not cached
  • wait for the txs become confirmed
  • inspect the caches again to verify that the newly confirmed txs are cached

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D10969

Details

Provenance
hungsamAuthored on Feb 3 2022, 01:18
hungsamPushed on Feb 3 2022, 23:50
Reviewer
Restricted Project
Differential Revision
D10969: [Cashtab] fix stale cached data
Parents
rABC0b586b6698e5: Refactor p2p_add_connections
Branches
Unknown
Tags
Unknown