Two quick improvements in the dashboard functions could be:
For mining data, when the current block changes:
- right now it blindly fetches 5 blocks worth of mining data
- check block numbers in array before fetching new data
- possible pattern: see if any are still valid and keep, then fetch new
- scenario 1: normal flow (block + 1)
- scenario 2: old data in range (block + 3)
- scenario 3: way stale block data (block + 50)
For stacking data:
- right now it fetches new data if block height changes
- instead it should fetch data if current reward cycle changes
- could use same patterns as mining above, but updated less often anyway so may not be worth the complexity
Two quick improvements in the dashboard functions could be:
For mining data, when the current block changes:
For stacking data: