Skip to content

GUI/Intro: pass -blocksdir to getPathToCheck if present - #948

Open
diegoviola wants to merge 1 commit into
bitcoin-core:masterfrom
diegoviola:intro-blocksdir-fix
Open

GUI/Intro: pass -blocksdir to getPathToCheck if present#948
diegoviola wants to merge 1 commit into
bitcoin-core:masterfrom
diegoviola:intro-blocksdir-fix

Conversation

@diegoviola

Copy link
Copy Markdown
Contributor

Fixes: #946

@DrahtBot

DrahtBot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
Concept ACK pablomartin4btc

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

@pablomartin4btc pablomartin4btc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Concept ACK

The actual problem in #946 is the intro dialog's prune suggestion (only shown the first time bitcoin-qt runs) — FreespaceChecker checks datadir's free space but the prune trigger uses the full blockchain + chainstate threshold (~880 GB), incorrectly suggesting prune when -blocksdir is set since only ~14 GB of chainstate goes to datadir. Skipping the dialog avoids the wrong suggestion.

@hebasto hebasto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure this is the correct approach.

For example, it breaks the -choosedatadir option, which is now ignored when combined with -blocksdir:

$ ./build_dev_mode/bin/bitcoin-qt -choosedatadir -blocksdir=/tmp/test_blocksdir
# no intro dialog is shown

@diegoviola
diegoviola force-pushed the intro-blocksdir-fix branch from cf2856b to 1ce7bdc Compare August 19, 2026 04:00
@diegoviola diegoviola changed the title GUI/Intro: Skip intro dialog when -blocksdir is manually passed GUI/Intro: pass -blocksdir to getPathToCheck if present Aug 19, 2026
@diegoviola

diegoviola commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

I'm not sure this is the correct approach.

For example, it breaks the -choosedatadir option, which is now ignored when combined with -blocksdir:

$ ./build_dev_mode/bin/bitcoin-qt -choosedatadir -blocksdir=/tmp/test_blocksdir
# no intro dialog is shown

Can you please try this new approach? The dialog is now being shown for me and prune is disabled when running ./bin/bitcoin-qt -choosedatadir -blocksdir=/path/to/bitcoin-blocks/ which I think is the correct behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider blocksdir when estimating available disk space to determine default pruning

4 participants