-
Notifications
You must be signed in to change notification settings - Fork 364
Relax GUI freezes during IBD (when using wallets) #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,8 @@ | |
| #include <wallet/fees.h> | ||
| #include <wallet/wallet.h> | ||
|
|
||
| #include <validation.h> | ||
|
|
||
| #include <QFontMetrics> | ||
| #include <QScrollBar> | ||
| #include <QSettings> | ||
|
|
@@ -134,7 +136,7 @@ void SendCoinsDialog::setClientModel(ClientModel *_clientModel) | |
| this->clientModel = _clientModel; | ||
|
|
||
| if (_clientModel) { | ||
| connect(_clientModel, &ClientModel::numBlocksChanged, this, &SendCoinsDialog::updateSmartFeeLabel); | ||
| connect(_clientModel, &ClientModel::numBlocksChanged, this, &SendCoinsDialog::updateNumberOfBlocks); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit, could connect to lambda to avoid changes in header file: connect(_clientModel, &ClientModel::numBlocksChanged, [this](int, const QDateTime&, double, bool, SynchronizationState sync_state) {
if (sync_state == SynchronizationState::POST_INIT) {
updateSmartFeeLabel();
}
}); |
||
| } | ||
| } | ||
|
|
||
|
|
@@ -744,6 +746,12 @@ void SendCoinsDialog::updateCoinControlState(CCoinControl& ctrl) | |
| ctrl.fAllowWatchOnly = model->wallet().privateKeysDisabled(); | ||
| } | ||
|
|
||
| void SendCoinsDialog::updateNumberOfBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool headers, SynchronizationState sync_state) { | ||
| if (sync_state == SynchronizationState::POST_INIT) { | ||
| updateSmartFeeLabel(); | ||
| } | ||
| } | ||
|
|
||
| void SendCoinsDialog::updateSmartFeeLabel() | ||
| { | ||
| if(!model || !model->getOptionsModel()) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ class ClientModel; | |
| class PlatformStyle; | ||
| class SendCoinsEntry; | ||
| class SendCoinsRecipient; | ||
| enum class SynchronizationState; | ||
|
|
||
| namespace Ui { | ||
| class SendCoinsDialog; | ||
|
|
@@ -98,6 +99,7 @@ private Q_SLOTS: | |
| void coinControlClipboardLowOutput(); | ||
| void coinControlClipboardChange(); | ||
| void updateFeeSectionControls(); | ||
| void updateNumberOfBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool headers, SynchronizationState sync_state); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: |
||
| void updateSmartFeeLabel(); | ||
|
|
||
| Q_SIGNALS: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: No reasons to create a separate group of headers.