mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-18 19:40:40 +01:00
refactor: Pass SynchronizationState enum to GUI
Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <net.h>
|
||||
#include <netbase.h>
|
||||
#include <util/system.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -234,8 +235,10 @@ static void BannedListChanged(ClientModel *clientmodel)
|
||||
assert(invoked);
|
||||
}
|
||||
|
||||
static void BlockTipChanged(ClientModel *clientmodel, bool initialSync, int height, int64_t blockTime, double verificationProgress, bool fHeader)
|
||||
static void BlockTipChanged(ClientModel* clientmodel, SynchronizationState sync_state, int height, int64_t blockTime, double verificationProgress, bool fHeader)
|
||||
{
|
||||
const bool initialSync = sync_state != SynchronizationState::POST_INIT;
|
||||
|
||||
// lock free async UI updates in case we have a new block tip
|
||||
// during initial sync, only update the UI if the last update
|
||||
// was > 250ms (MODEL_UPDATE_DELAY) ago
|
||||
|
||||
Reference in New Issue
Block a user