mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
rework ClientModel::getBlockSource() + BitcoinGUI::setNumBlocks()
- updates ClientModel::getBlockSource() to return all available states and sorts enum BlockSource in order of usage cases (none default, then reindex, import and network) - updates BitcoinGUI::setNumBlocks() to better use getBlockSource() and also adds a message, when we have NO block source available
This commit is contained in:
parent
1258dde48d
commit
4881353efe
3 changed files with 23 additions and 26 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue