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

wallet2 fails to save to disk if first created in-memory #8932

Closed
woodser opened this issue Jul 6, 2023 · 5 comments · Fixed by #8937
Closed

wallet2 fails to save to disk if first created in-memory #8932

woodser opened this issue Jul 6, 2023 · 5 comments · Fixed by #8937

Comments

@woodser
Copy link
Contributor

woodser commented Jul 6, 2023

If wallet2 is first created in-memory (i.e. with empty path ""), then it will fail to save to disk, due to incorrect assumptions that the other files have already been created, based on this comment and the following logic: https://github.com/monero-project/monero/blob/master/src/wallet/wallet2.cpp#L6238

This issue requests fixing wallet2 to correctly save to disk after being created in-memory with empty path.

@jeffro256
Copy link
Contributor

jeffro256 commented Jul 6, 2023

Which interface are you invoking to attempt to get it to save to the disk? Are you calling store_to() directly? Not necessarily super important, but just curious. Also, I can fix this v soon, thanks for finding that

@woodser
Copy link
Contributor Author

woodser commented Jul 6, 2023

Yeah I'm calling store_to directly, to support moving the wallet files here.

@jeffro256
Copy link
Contributor

lmao just found another issue with store_to which was driving me utterly insane while unit testing a fix: if the new file path contains the old file path, it thinks its the same file and just deletes the cache.

@jeffro256
Copy link
Contributor

Because I was trying to move a wallet file from name to name_new and the keys file showed up in the right place but my cache file kept disappearing

@jeffro256
Copy link
Contributor

AND it doesn't save cache on when the file is different anyways??

woodser pushed a commit to woodser/monero that referenced this issue Jul 24, 2023
Resolves monero-project#8932 and:
2. Not storing cache when new path is different from old in `store_to()` and
3. Detecting same path when new path contains entire string of old path in `store_to()` and
4. Changing your password / decrypting your keys (in this method or others) and providing a bad original password and getting no error and
5. Changing your password and storing to a new file
jeffro256 added a commit to jeffro256/monero that referenced this issue Aug 23, 2023
Resolves monero-project#8932 and:
2. Not storing cache when new path is different from old in `store_to()` and
3. Detecting same path when new path contains entire string of old path in `store_to()` and
4. Changing your password / decrypting your keys (in this method or others) and providing a bad original password and getting no error and
5. Changing your password and storing to a new file
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 a pull request may close this issue.

2 participants