Remove reindex special case from the progress bar label
This commit is contained in:
5 files changed
+10
-23
No files matched your search
@@ -1071,7 +1071,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
|
||||
statusBar()->clearMessage();
|
||||
|
||||
// Acquire current block source
|
||||
enum BlockSource blockSource = clientModel->getBlockSource();
|
||||
BlockSource blockSource{clientModel->getBlockSource()};
|
||||
switch (blockSource) {
|
||||
case BlockSource::NETWORK:
|
||||
if (synctype == SyncType::HEADER_PRESYNC) {
|
||||
@@ -1091,9 +1091,6 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
|
||||
progressBarLabel->setText(tr("Processing blocks on disk…"));
|
||||
}
|
||||
break;
|
||||
case BlockSource::REINDEX:
|
||||
progressBarLabel->setText(tr("Reindexing blocks on disk…"));
|
||||
break;
|
||||
case BlockSource::NONE:
|
||||
if (synctype != SyncType::BLOCK_SYNC) {
|
||||
return;
|
||||
|
||||
@@ -146,15 +146,10 @@ uint256 ClientModel::getBestBlockHash()
|
||||
return m_cached_tip_blocks;
|
||||
}
|
||||
|
||||
enum BlockSource ClientModel::getBlockSource() const
|
||||
BlockSource ClientModel::getBlockSource() const
|
||||
{
|
||||
if (m_node.getReindex())
|
||||
return BlockSource::REINDEX;
|
||||
else if (m_node.getImporting())
|
||||
return BlockSource::DISK;
|
||||
else if (getNumConnections() > 0)
|
||||
return BlockSource::NETWORK;
|
||||
|
||||
if (m_node.isLoadingBlocks()) return BlockSource::DISK;
|
||||
if (getNumConnections() > 0) return BlockSource::NETWORK;
|
||||
return BlockSource::NONE;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,9 +32,8 @@ QT_END_NAMESPACE
|
||||
|
||||
enum class BlockSource {
|
||||
NONE,
|
||||
REINDEX,
|
||||
DISK,
|
||||
NETWORK
|
||||
NETWORK,
|
||||
};
|
||||
|
||||
enum class SyncType {
|
||||
@@ -72,8 +71,8 @@ public:
|
||||
int getHeaderTipHeight() const;
|
||||
int64_t getHeaderTipTime() const;
|
||||
|
||||
//! Returns enum BlockSource of the current importing/syncing state
|
||||
enum BlockSource getBlockSource() const;
|
||||
//! Returns the block source of the current importing/syncing state
|
||||
BlockSource getBlockSource() const;
|
||||
//! Return warnings to be displayed in status bar
|
||||
QString getStatusBarWarnings() const;
|
||||
|
||||
|
||||
Reference in new issue
Block a user