diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-03-04 20:05:42 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-05-19 02:49:32 +0300 |
commit | 1dab574edf57ccd6cdf5ec706ac328c62142d7a2 (patch) | |
tree | ce6c55a92d99648b2adf4cbbda0ccf6c282654bc /src/qt | |
parent | 2bec309ad6d0f2543948d64ed26f7d9a903f67e5 (diff) |
refactor: Pass SynchronizationState enum to GUI
Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/clientmodel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index b94fcc9865..abda980384 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -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 |