-
Notifications
You must be signed in to change notification settings - Fork 647
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
Partially fix Issue #151: CLI account caching #640
Conversation
…it could easily go out of sync
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.
Looks good.
BTW the issue was described in #151 .
Mention the issue number in a comment links the issue with the PR (clickable on github), but not if it's only in the title.
//Update: my fault. Mentioning in a review doesn't link either.
Please be aware that |
@abitmore Thanks. I gather we should've fixed list_my_accounts as well, but it needs some more coding, besides the function is not that useful in our experience. |
Thanks. Added notes to OP of #151. Feel free to ask if have any question. |
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 fully agree with this change. the cache don't work properly and it is better to have it removed from everywhere for more node calls. this is def a good start. good job, i am merging your code now, it builds ok and works as expected.
We have extensive experience with cli_wallet and we find that the cached account_object could easily go stale thus ruining any further transactions, meaning the new transactions issued with cli_wallet would contain out-of-date information, this way you can loose your data (votes, keys, etc) and your money (you'll need to issue more transactions to restore the previous valid state).
When working simultaneously with cli_wallet and the web UI the issue only exacerbates: now you just can't switch from one tool to another, you're basically bound to the UI. The only safe workaround is to kill wallet.json and re-import the keys and do this every time you want to use cli_wallet.
We think there is no better solution other than removing the caching altogether. Granted, this would incur some extra RPC requests but it's a small pay for the predactability and stability of the essential tool.