@@ -315,11 +315,9 @@ void BitcoinApplication::parameterSetup()
315315 InitParameterInteraction (gArgs );
316316}
317317
318- void BitcoinApplication::InitializePruneSetting ( bool prune )
318+ void BitcoinApplication::InitPruneSetting ( int64_t prune_MiB )
319319{
320- // If prune is set, intentionally override existing prune size with
321- // the default size since this is called when choosing a new datadir.
322- optionsModel->SetPruneTargetGB (prune ? DEFAULT_PRUNE_TARGET_GB : 0 , true );
320+ optionsModel->SetPruneTargetGB (PruneMiBtoGB (prune_MiB), true );
323321}
324322
325323void BitcoinApplication::requestInitialize ()
@@ -508,9 +506,9 @@ int GuiMain(int argc, char* argv[])
508506 // / 5. Now that settings and translations are available, ask user for data directory
509507 // User language is set up: pick a data directory
510508 bool did_show_intro = false ;
511- bool prune = false ; // Intro dialog prune check box
509+ int64_t prune_MiB = 0 ; // Intro dialog prune configuration
512510 // Gracefully exit if the user cancels
513- if (!Intro::showIfNeeded (did_show_intro, prune )) return EXIT_SUCCESS;
511+ if (!Intro::showIfNeeded (did_show_intro, prune_MiB )) return EXIT_SUCCESS;
514512
515513 // / 6. Determine availability of data directory and parse bitcoin.conf
516514 // / - Do not call GetDataDir(true) before this step finishes
@@ -594,7 +592,7 @@ int GuiMain(int argc, char* argv[])
594592
595593 if (did_show_intro) {
596594 // Store intro dialog settings other than datadir (network specific)
597- app.InitializePruneSetting (prune );
595+ app.InitPruneSetting (prune_MiB );
598596 }
599597
600598 if (gArgs .GetBoolArg (" -splash" , DEFAULT_SPLASHSCREEN) && !gArgs .GetBoolArg (" -min" , false ))
0 commit comments