-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
remove store() from close() #2289
Conversation
It has indeed no impact on simplewallet, as it does not use that API. |
This will break the GUI. Should be trivial to fix though. But since there might be other software relying on this behavior maybe better to add a |
good idea. implemented & squashed. BUT as we cannot parametrize the desctructor (can we?) it calls close(false) so we can delete a wallet object without force-saving. |
Looks good. I'd prefer this being merged after todays code freeze/release tag since GUI relies on that close&save call in the destructor. @moneromooo-monero @fluffypony |
sorry - had forgotten that in the API the Wallet is closed through the WalletManager - added the store flag to the closeWallet function there too. |
Was this rebased? How did readline commits get into this PR? |
i have no idea how that got in there! i synced to the upstream v0.11.0.0, fixed a bug (store=true was missing in the wallet2_api.h) and committed that. tried to squash/rebase and this is where I am now. any idea how to fix this? or I could make a new clean branch with the changes and file a new PR. |
fa03fa5
to
d0d6888
Compare
so I rebased on release-v0.11.0.0 |
@m2049r ah - you're meant to rebase off master, not a release branch:) Can you re-rebase? |
If those updates are meant to have rebased, they did not. That should do it: git checkout master |
a7e41ae
to
3973f6c
Compare
sorry about all this! git is killing me - it was getting all kind of conflicts in weird places. i think i got it now. if not i will close this and make a new PR. |
You probably didn't push your latest attempt. |
only shows me my changes. so does |
The "47" at the top, in the "Commits" page. Click on that, and see the huge amount of commits requested for merging. Maybe your master is shot ? What is its top hash ? |
applied the changes to a new branch from master and forced push! thank you for you patience. |
That did it, thanks. |
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.
Reviewed
6ee1116 store is optional during close and defaults to true; except during descruction (m2049r)
close should not store. otherwise there is no possibility to close without store.
also, the Wallet destructor calls close() which in turn stores the wallet - this takes a long time with no possibility of error detection/correction. destructors should not be persisting data.
the Wallet::close() closes and then deletes the WalletImpl on success which actually stores the wallet again (!!) wasting even more time.
In case someone is actively relying on this behaviour it would break!
I also think this change has no effect on simplewallet which stores and closes (stops) independently.