-
Notifications
You must be signed in to change notification settings - Fork 38.7k
system: use %LOCALAPPDATA% as default datadir on windows #27064
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
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsNo conflicts as of last run. |
|
cc @sipsorcery |
ghost
left a comment
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.
|
Would this change need a |
a2bfd52 to
d0b715a
Compare
|
Push to 60cd07b781bfe46262a5d66c97e257e0dd378f5c:
|
|
Concept ACK. |
src/common/args.cpp
Outdated
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.
Update the PR description:
we check for the existence of
C:\Users\Username\AppData\Roaming\Bitcoin\blocks
?
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.
Good catch thanks. (fixed) First draft of this PR did check for blocks directory but of course that is unreliable because it could be customized by the user.
|
This change ignores non-main network data. I'm OK with that. But it seems worth mentioning in the docs. |
Ah I see, because I'm checking for
Sure but I feel like that's not super clean either. |
|
Why would we prefer local over roaming explicitly? |
In other words, 500 GB of blockchain data would be copied to a user's remote workstation as they move around. Roaming is just supposed to be for small files like profile preferences, etc. Not big data stores. More discussion in #2391 |
I think we should check for existence of |
60cd07b to
c941712
Compare
revised, rebased on master and pushed thanks. I tested this "in production" on my windows laptop but found writing a functional test to be impossible. I thought I could model a test after @ryanofsky commit here: 8d777c0 ...but for default datadir we use windows' |
|
Could rebase for fresh CI, if still relevant? |
|
crACK c941712c269d34e6496db35424e567c7f6ba34e8 Have not yet tested on a Windows machine. |
c941712 to
c59b1e4
Compare
rebased on master |
hebasto
left a comment
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.
ACK c59b1e45db7b62ba0e0c833e6517045d3dfeacd0, tested on Windows 11 Pro 23H2.
doc/bitcoin-conf.md
Outdated
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.
| Windows | `%APPDATA%\Bitcoin\` | `C:\Users\username\AppData\Local\Bitcoin\bitcoin.conf` | |
| Windows | `%LOCALAPPDATA%\Bitcoin\` | `C:\Users\username\AppData\Local\Bitcoin\bitcoin.conf` |
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.
typo:
| compatability if it is present. | |
| compatibility if it is present. |
src/common/args.cpp
Outdated
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.
nit: Could add curly braces or put in a single line?
c59b1e4 to
84900ac
Compare
|
@hebasto thanks for the review, I addressed your comments |
hebasto
left a comment
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.
|
ACK 84900ac Tested on Windows. |
|
crACK 84900ac Have not tested on a Windows machine. |
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.
Btw, this file should go in the doc/ dir instead of doc/release-notes/ (which is the archive of old release notes by version)
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.
oh whoops, thanks. Should I move it now?
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.
Not a big deal, just don't want it to get missed when releasing 28.0
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.
Ok thanks again, I'll make sure it gets corrected at that time
Closes #2391
This PR changes the default datadir location on Windows from
C:\Users\Username\AppData\Roaming\BitcointoC:\Users\Username\AppData\Local\Bitcoin. This change only applies to fresh installs. To preserve backwards compatibility, on startup we check for the existence ofC:\Users\Username\AppData\Roaming\Bitcoin\chainstateand if it is there, we continue using the "Roaming" directory as the default datadir location.Note that in Windows 11 this change may be moot: