-
Notifications
You must be signed in to change notification settings - Fork 92
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
asset: create btcwallet+neutrino log dir and file without initialization #1946
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.
Looks fixed to me.
Looks like the dir: filepath.Join(cfg.WalletCFG.DataDir, cfg.ChainParams.Name, "spv"), and the log file is created in that directory. If we instead created the log files in, say, filepath.Join(cfg.WalletCFG.DataDir, cfg.ChainParams.Name, "spvlogs") this wouldn't be an issue. |
I think the issue is that only the log dir is created while the |
My read might be wrong, but it seems to me that the problem is that |
What is the expected behaviour for new wallets(the create wallet method does not know it's a recovery)? And does it mean the wallet log should be untouched in any scenario? |
I don't see a reason to start new log files when we perform recovery. We'll want the record to be continuous, no? |
Hmm, maybe not, because we ought to keep all details regarding the old wallet including the logs on the |
I think Buck is saying we should just not delete the logs. We can still copy them. Also with the current PR, dcrwallet loggers keep using the old log rotator. I don't see how it's working. |
Okay, I had assumed the expected behaviour for recovery is to remove everything related to the previous wallet(including logs) from the main wallet dir. However, @buck54321 suggestion(#1946 (comment)) will help keep changes minimal, I think. |
3ca6f20
to
1e56f6d
Compare
@buck54321, RE: #1946 (comment), I had to move some things around in 1e56f6d |
1e56f6d
to
441eeb3
Compare
441eeb3
to
b18f6c1
Compare
- This moves existing spv wallet logs to a new log path(logs -> spvlogs), which fixes an issue where wallet recovery removes the existing spv log file. Now an spv wallet log file is never deleted. Wallet receovery may only copy the wallet log file. - Fix typos
b18f6c1
to
496848a
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.
Works so that the wallet file is accessible (and continuous) after recover.
Just need to rework the file copy code so it is buffered, not loading a whole file into memory.
This fixes an issue where wallet recovery deletes the existing neutrino log file but logging initialization is a one-time operation. Closes #1944.