@@ -135,19 +135,7 @@ Intro::Intro(QWidget *parent, int64_t blockchain_size_gb, int64_t chain_state_si
135
135
}
136
136
const int prune_target_gb = PruneMiBtoGB (prune_target_mib);
137
137
ui->prune ->setText (tr (" Discard blocks after verification, except most recent %1 GB (prune)" ).arg (prune_target_gb ? prune_target_gb : DEFAULT_PRUNE_TARGET_GB));
138
- m_required_space_gb = m_blockchain_size_gb + m_chain_state_size_gb;
139
- QString storageRequiresMsg = tr (" At least %1 GB of data will be stored in this directory, and it will grow over time." );
140
- if (0 < prune_target_gb && prune_target_gb <= m_blockchain_size_gb) {
141
- m_required_space_gb = prune_target_gb + m_chain_state_size_gb;
142
- storageRequiresMsg = tr (" Approximately %1 GB of data will be stored in this directory." );
143
- }
144
- ui->lblExplanation3 ->setVisible (prune_target_gb > 0 );
145
- ui->sizeWarningLabel ->setText (
146
- tr (" %1 will download and store a copy of the Bitcoin block chain." ).arg (PACKAGE_NAME) + " " +
147
- storageRequiresMsg.arg (m_required_space_gb) + " " +
148
- tr (" The wallet will also be stored in this directory." )
149
- );
150
- this ->adjustSize ();
138
+ UpdatePruneLabels (prune_target_gb);
151
139
startThread ();
152
140
}
153
141
@@ -341,3 +329,20 @@ QString Intro::getPathToCheck()
341
329
mutex.unlock ();
342
330
return retval;
343
331
}
332
+
333
+ void Intro::UpdatePruneLabels (int64_t prune_target_gb)
334
+ {
335
+ m_required_space_gb = m_blockchain_size_gb + m_chain_state_size_gb;
336
+ QString storageRequiresMsg = tr (" At least %1 GB of data will be stored in this directory, and it will grow over time." );
337
+ if (0 < prune_target_gb && prune_target_gb <= m_blockchain_size_gb) {
338
+ m_required_space_gb = prune_target_gb + m_chain_state_size_gb;
339
+ storageRequiresMsg = tr (" Approximately %1 GB of data will be stored in this directory." );
340
+ }
341
+ ui->lblExplanation3 ->setVisible (prune_target_gb > 0 );
342
+ ui->sizeWarningLabel ->setText (
343
+ tr (" %1 will download and store a copy of the Bitcoin block chain." ).arg (PACKAGE_NAME) + " " +
344
+ storageRequiresMsg.arg (m_required_space_gb) + " " +
345
+ tr (" The wallet will also be stored in this directory." )
346
+ );
347
+ this ->adjustSize ();
348
+ }
0 commit comments