Skip to content
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

Merged
merged 1 commit into from
Sep 25, 2017
Merged

Conversation

m2049r
Copy link
Contributor

@m2049r m2049r commented Aug 12, 2017

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.

@moneromooo-monero
Copy link
Collaborator

It has indeed no impact on simplewallet, as it does not use that API.

@Jaqueeee
Copy link
Contributor

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 bool store function parameter that defaults to true?

@m2049r
Copy link
Contributor Author

m2049r commented Aug 15, 2017

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.

@Jaqueeee
Copy link
Contributor

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

@m2049r
Copy link
Contributor Author

m2049r commented Aug 15, 2017

sorry - had forgotten that in the API the Wallet is closed through the WalletManager - added the store flag to the closeWallet function there too.

@hyc
Copy link
Collaborator

hyc commented Sep 6, 2017

Was this rebased? How did readline commits get into this PR?

@m2049r
Copy link
Contributor Author

m2049r commented Sep 6, 2017

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.

@m2049r m2049r force-pushed the m2049r_nost branch 2 times, most recently from fa03fa5 to d0d6888 Compare September 6, 2017 10:55
@m2049r
Copy link
Contributor Author

m2049r commented Sep 6, 2017

so I rebased on release-v0.11.0.0

@fluffypony
Copy link
Contributor

@m2049r ah - you're meant to rebase off master, not a release branch:) Can you re-rebase?

@moneromooo-monero
Copy link
Collaborator

moneromooo-monero commented Sep 21, 2017

If those updates are meant to have rebased, they did not.

That should do it:

git checkout master
git pull --rebase
git checkout monero
git rebase master

@m2049r m2049r force-pushed the m2049r_nost branch 2 times, most recently from a7e41ae to 3973f6c Compare September 21, 2017 15:30
@m2049r
Copy link
Contributor Author

m2049r commented Sep 21, 2017

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.

@moneromooo-monero
Copy link
Collaborator

You probably didn't push your latest attempt.

@m2049r
Copy link
Contributor Author

m2049r commented Sep 21, 2017

git checkout -b x origin/m2049r_nost
git diff master

only shows me my changes. so does git diff upstream/master - what am i missing?

@moneromooo-monero
Copy link
Collaborator

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 ?

@m2049r
Copy link
Contributor Author

m2049r commented Sep 22, 2017

applied the changes to a new branch from master and forced push! thank you for you patience.

@moneromooo-monero
Copy link
Collaborator

That did it, thanks.

Copy link
Contributor

@fluffypony fluffypony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

@fluffypony fluffypony merged commit 6ee1116 into monero-project:master Sep 25, 2017
fluffypony added a commit that referenced this pull request Sep 25, 2017
6ee1116 store is optional during close and defaults to true; except during descruction (m2049r)
@m2049r m2049r deleted the m2049r_nost branch September 26, 2017 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants