-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Interpret absense of prune= as prune=1 if there are pruned blocks #13029
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
2303d0f to
34b38ab
Compare
|
I may have been a bit overzealous with
|
34b38ab to
7a65e3c
Compare
|
I'm not entirely sure about this. Guessing values for options according to context has the drawback that the system becomes less transparent, harder to troubleshoot. Also it's good to avoid It also seems a large code change for what feels like a small argument handling change. And if we do this, should we do the same for txindex? |
|
@Sjors: can you elaborate a little bit the use case this solves? Agree with @laanwj that other arguments would have the same problem (if we would agree it is a problem). |
|
The problem I'm trying to solve here is being able to set Another approach could be to reinterpret A similar problem exists for txindex, but that's solved by #13033, which no longer wipes the transaction index if you launch with |
|
Needs rebase if still relevant |
7a65e3c to
c416d89
Compare
|
Rebased. I might make a separate PR with a different approach:
I don't think that approach would require much less code, but it is perhaps more future proof, once |
|
Needs rebase due to merge of #13341 |
bool fPruneMode is replaced by an enum class to include an UNKNOWN state. fHavePruned is used to set fPruneNode if argument is not explictly set.
c416d89 to
fa90f1f
Compare
|
Rebased |
cbede7d [qt] OptionsDialog: add prune setting (Sjors Provoost) Pull request description: The default suggested value is 2 GB. Minimum is 1 GB (550 MB rounded up). When the user toggles this setting, a strong warning appears that undoing requires re-downloading the chain: <img width="478" alt="schermafbeelding 2018-05-15 om 12 35 24" src="https://user-images.githubusercontent.com/10217/40051858-7939cc20-583c-11e8-9120-327a75376732.png"> Tooltip points out that actual disk usage can be higher. It's a bit vague on the "advanced features", because I'm assuming anyone who needs to use `-rescan` and `-txindex` will read the documentation, and a more detailed text would needlessly confuse everyone else. <img width="450" alt="schermafbeelding 2018-05-15 om 12 33 51" src="https://user-images.githubusercontent.com/10217/40051791-49d6156a-583c-11e8-97b9-7de6dfd8c481.png"> The UI uses gigabytes for readability and easy of use. There is also no manual pruning UI (`prune=1`). The user will have to use `bitcoin.conf` for those things. Fixes #6461. When combined with #13029 the user, after pruning their node, can safely reset settings and/or use bitcoind without having to edit `bitcoin.conf`. However I don't think that's an essential prerequisite. Tree-SHA512: e17aff276d7235fbd40796adb6431d430620788a753ee13bc064abd35d2edc4280a3d3cddc18e42b4e00edff13ed18fd4f2a966c6f0b43b689afd13673e0c4bf
|
Closing this because the rw_config approach in #11082 seems to have sufficient support. |
bool fPruneModeis replaced by an enum class to include anUNKNOWNstate.fHavePrunedis used to setfPruneNodeif argument is not explictly set.