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

[Config] Ignore prune mode if txindex is set #874

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

CaveSpectre11
Copy link
Collaborator

Problem

#253 - Prune mode incompatible with txindex.
Having prune mode on can stick the user into being unable to start their wallet. For Qt: they receive an error stating "Prune mode is Incompatible with -txindex"

Root Cause

The error was a little heavy handed, and rejected the use of prune mode without txindex=0. The part of this issue that makes it important to address is that you can inadvertently end up with bPrune set in your registry on windows; making it difficult to find and remove. There is an additional issue that implies that uninstalling your wallet will not remove the registry entries; so getting bPrune=true in your registry would be quite challenging to clear out, and likely result in support tickets.

Solution

Note that prune mode is unsupported and likely will result in corrupting your wallet. This is not meant to claim that prune mode is functional.

If Prune mode is set and txindex is not implicitly disabled [txindex=0], the wallet will not run. This PR changes the prune mode from an error that shuts down the wallet, to a warning that ignores prune mode if txindex is enabled. This warning will not show in a Windows pop-up, but rather in the log file and the terminal executing the daemon and/or qt. It will also ignore the prune mode setting, changing it to '0' if it is set.

Testing

combinations of txindex=[0|1], prune=[0|1] in your config file, command line, and bPrune=true in your registry [see issue #253 for registry details]

@CaveSpectre11 CaveSpectre11 added Component: GUI Primarily related to the display of the user interface Component: Wallet Relating to keystore, tx creation, and balance tracking Tag: OS - Windows Specific to Windows operating system Tag: Waiting For QA A pull review is waiting for QA to test the pull request Tag: Waiting For Code Review Waiting for code review from a core developer labels Nov 23, 2020
@CaveSpectre11 CaveSpectre11 self-assigned this Nov 23, 2020
Copy link
Collaborator

@codeofalltrades codeofalltrades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 5d49651

Set the prune setting via the GUI.
tested with
txindex=1, prune=1
txindex=0, prune=1
txindex=1, prune=0
txindex=0, prune=0

All the test passed.
OS Win10

@codeofalltrades codeofalltrades added Code Review: Passed QA: Passed This has passed QA testing and can be merged to master and removed Tag: Waiting For Code Review Waiting for code review from a core developer Tag: Waiting For QA A pull review is waiting for QA to test the pull request labels Nov 25, 2020
@codeofalltrades codeofalltrades merged commit 2f83d92 into Veil-Project:master Nov 25, 2020
@CaveSpectre11 CaveSpectre11 deleted the pruneMode branch December 11, 2020 14:21
@CaveSpectre11 CaveSpectre11 added this to the v1.1.1 milestone Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Review: Passed Component: GUI Primarily related to the display of the user interface Component: Wallet Relating to keystore, tx creation, and balance tracking QA: Passed This has passed QA testing and can be merged to master Tag: OS - Windows Specific to Windows operating system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants