-
Notifications
You must be signed in to change notification settings - Fork 3
[#730] feat: cache rework #742
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much better than what we have in master.
Here's the issues I've been able to find:
- If you add an address with a boatload of txs, the Dashboard doesn't seem to get most of them:
- Would be good to be able to differentiate between when there are 'No transactions.' and when it just needs a moment to grab them the first time. We have a separate task for this I'm pretty sure.
- 'Payments' page no longer has a scrollbar for some reason (although scrolling with the mouse or keyboard still works).
This seems to be true to the
Indeed. I found this issue #316 which is not too specific but we can make that clearer there.
This shall be fixed when I address the Payments page in detail in the next PR, |
c5b7718 to
546d37a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Klakurka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You know what -- it actually looks totally fine. Due to the difficulty adjustment that took place until Nov 17, there were fewer than expected blocks then.
We can double check the numbers later but looks good at first glance.
services/paybuttonService.ts
Outdated
| }, | ||
| include: includeAddresses | ||
| }) | ||
| // Update cache for existent addreses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better comment would be explaining when this happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment was more useful before the creation of CacheSet; removed.
I don't understand what would be the when you refer to, since this function will always update the cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind -- but comments should be useful if they're going to be there so I'll leave it up to you what you want to do with it.
Klakurka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably just the one renaming and we're good.
Addressed. |

Related to #730
Description
redis/directory plus atypes.tsfile with all cache interfaces. Furthermore, there is now two interfacesCacheSetandCacheGetonredis/index.tswhich will be used all across the codebase to actually get or set the cache values. TheCacheSetinterfaces export functions that are named after the unique context they will be used: for example:CacheSet.paybuttonUpdateis what will run when a paybutton is updated (and never in any other situation).isSyncingnew address column to show on the wallet card that one of its addresses is syncingTest plan
Experiment with having a big address added (I use
ecash:qrcuqadqrzp2uztjl9wn5sthepkg22majylrprqkuk) and checking if the dashboard values, the balance shown in the wallet and the payment list all are updated live, as the transactions arrive.Also, after the sync is done, check that these values are not changing anymore and load very fast. This should include the logic for creating a Paybutton, since it gets the data for wallets and this in master was bottlenecking paybutton creation when a wallet would have a lot of transactions.
The whole codebase should work well even with large addresses added to the account, except for the
paymentspage which should still await for #741 to have a smooth behavior.