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
Pruning should be based on bitcoin.conf #245
Comments
@prayank23
It is a common consensus that, for safety, the opposite seems correct. From
|
@hebasto How about adding a confirmation window before this pruning begins based on GUI settings? If user clicks YES, prune based on GUI settings. If user clicks NO, do not prune based on GUI settings and disable pruning. This confirmation can be triggered if pruning is enabled in GUI settings and not found in |
It works fine if I comment this line and launch Line 1830 in 6bc51af
|
so, a one-line fix? |
I am not sure why this line exists and if removing this will break something else. |
It should not prune if you set |
Interesting. I think I will close this issue for now but this problem needs a better solution because if a software is deleting such important data for user, there needs to be atleast some warning or confirmation message. |
More info: |
Having nothing in the config file is the same as having "prune=[defaultValue]". I assume, "defaultValue" = "0" in this case, because we talking about days of waiting and hundreds of gigabytes of data, which was downloaded for reasons. |
Its mentioned that options set in GUI will be overridden by the configuration file. I had nothing for mainnet in
bitcoin.conf
, removedtestnet=1
andprune=555
for testnet, saved newdatadir
path for external drive that had mainnet synced.I launched
bitcoin-qt
assuming it will not prune anything because there is nothing mentioned inbitcoin.conf
, it deleted all my data and pruning was done based on GUI options which had 2 GB saved either by default or maybe I saved it in past.Expected behavior
If
bitcoin.conf
does not mention anything about pruning it should not prune. If GUI for mainnet had pruning enabled in GUI, it should be saved automatically inbitcoin.conf
as well to avoid the confusion and things remain in sync.Actual behavior
Pruning is done based on GUI options
To reproduce
Sync a full node. Maybe testnet which will take less time.
Use the blocks and chainstate in other node (which had pruning enabled in GUI) using
datadir
andbitcoin.conf
doesn't have anything else.Launch
bitcoin-qt
System information
Bitcoin Core v 0.21.0. Ubuntu 20.04.2 LTS.
The text was updated successfully, but these errors were encountered: