aboutsummaryrefslogtreecommitdiff
path: root/src/qt/clientmodel.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2013-04-18 05:54:42 -0700
committerWladimir J. van der Laan <[email protected]>2013-04-18 05:54:42 -0700
commitdc2de757a496fe2f0f385dc4dc803d8838219aa3 (patch)
tree13aff2e8c50739b2d3345a21745ad73dc20aac13 /src/qt/clientmodel.cpp
parentMerge pull request #2524 from jonasschnelli/new_splashscreen_fresh (diff)
parentrework ClientModel::getBlockSource() + BitcoinGUI::setNumBlocks() (diff)
downloaddiscoin-dc2de757a496fe2f0f385dc4dc803d8838219aa3.tar.xz
discoin-dc2de757a496fe2f0f385dc4dc803d8838219aa3.zip
Merge pull request #2501 from Diapolo/progress
rework ClientModel::getBlockSource() + BitcoinGUI::setNumBlocks()
Diffstat (limited to 'src/qt/clientmodel.cpp')
-rw-r--r--src/qt/clientmodel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index c17c602b5..e8d99a8d4 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -122,9 +122,12 @@ enum BlockSource ClientModel::getBlockSource() const
{
if (fReindex)
return BLOCK_SOURCE_REINDEX;
- if (fImporting)
+ else if (fImporting)
return BLOCK_SOURCE_DISK;
- return BLOCK_SOURCE_NETWORK;
+ else if (getNumConnections() > 0)
+ return BLOCK_SOURCE_NETWORK;
+
+ return BLOCK_SOURCE_NONE;
}
int ClientModel::getNumBlocksOfPeers() const