- Call `statusUpdateNeeded` before `tryGetTxStatus`. This allows to run
the latter only if really required i.e. if `statusUpdateNeeded` returns true.
- Reuse `cachedNumBlocks` from `WalletModel` in `TransactionTablePriv::index()` to _actually_ avoid redundant tx status updates
- Initialize `cachedNumBlocks` and `cachedChainLockHeight` with `-1` to avoid extra `pollBalanceChanged` call
bf36a3ccc212ad4d7c5cb8f26d7a22e279fe3cec gui: Fix race in WalletModel::pollBalanceChanged (Russell Yanofsky)
Pull request description:
Poll function was wrongly setting cached height to the current chain height instead of the chain height at the time of polling.
This bug could cause balances to appear out of date, and was first introduced a0704a8996 (diff-2e3836af182cfb375329c3463ffd91f8L117). Before that commit, there wasn't a problem because cs_main was held during the poll update.
Currently, the problem should be rare. But if 8937d99ce81a27ae5e1012a28323c0e26d89c50b from #17954 were merged, the problem would get worse, because the wrong cachedNumBlocks value would be set if the wallet was polled in the interval between a block being connected and it processing the BlockConnected notification.
MarcoFalke also points out that a0704a8996 could lead to GUI hangs as well, because previously the pollBalanceChanged method, which runs on the GUI thread, would only make a nonblocking TRY_LOCK(cs_main) call, but after could make blocking LOCK(cs_main) calls, potentially locking up the GUI.
Thanks to John Newbery for finding this bug this while reviewing https://github.com/bitcoin/bitcoin/pull/17954.
ACKs for top commit:
Empact:
utACK bf36a3ccc2
jonasschnelli:
utACK bf36a3c
Tree-SHA512: 1f4f229fa70a6d1fcf7be3806dca3252e86bc1755168fb421258389eb95aae67f863cb1216e6dc086b596c33560d1136215a4c87b5ff890abc8baaa3333b47f4
Made node sense to squash it into the related OptionsDialog commit of
the initial PR because this diff uses the wallet interface which gets
introduced one commit after the related commit.
* update public part of windows code signing certificate
Signed-off-by: pasta <pasta@dashboost.org>
* Fixing line-breaks
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Drop icon sources (svg) we no longer use
* Rename some icons to better match their content
* Drop chevron/console prompt icon
We do not show it in Dash specific themes and Traditional is just fine with a simple ">" label
* bitcoin -> dash for icons
* Adjust `contrib/debian/copyright`
Dashify it + we no longer use icons mentioned there
* `mogrify src/qt/res/*/*.png`
* `python3 contrib/devtools/optimize-pngs.py`
Total reduction: 68072 bytes
* test: Optimize feature_block_reward_reallocation.py
Signed-off-by: pasta <pasta@dashboost.org>
* use submitblock instead of p2p.send_blocks_and_test in one more place
* drop empty line
* make sure all nodes are synced after reallocation is done
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* qt: Update the application font if the font family gets changed
* qt: Make sure recent transactions have the correct font family
Introduced because QListView is ignored in GUIUtil::updateFonts, so its base font family doesn't change, hence the recent transactions don't adjust because the painter's font doesn't change.
* Store initial font size
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* qt: Bring back setMinimumHeight for recent tx list
This partially reverts a3604f5c7c
Turns out that we still need this at least on Windows (not sure why but tx list looks clipped there atm)
* Reduce number of items in recent tx list by 1 (for PS enabled cases only)
Most users will never see immature funds and the list is going to be too long for them most of the time
* qt: Make sure font size in MasternodeList gets scaled as expected
* qt: Make sure font size in ShutdownWindow gets scaled as expected
* qt: Drop obsolete application font updates
* qt: Scale QMenu and QMessageBox globally
To make sure non-custom context menus + QMessageBox instances createy by
static calls like QMessageBox::critical are scaled also.
* qt: Avoid redundant scaling for tooltips and menus
* qt: Only update widget's font if required
* qt: Merge GUIUtil::mapFontSizeUpdates into GUIUtil::mapNormalFontUpdates
* qt: Remove obsolete setFixedPitchFont call
* qt: Use setFixedPitchFont in SendCoinsEntry
* qt: Scale font size in increments of 0.25
* qt: Properly scale network traffic stats depending on font metrics
* qt: Update min/max width of OptionsDialog depending on buttons width
* qt: Emit a signal whenever any attribute of AppearanceWidget changed
* qt: Update OptionsDialog width if the appearance changed
* qt: Calculate the initial wide right after the window showed up
Make sure the visibility state of the widgets is correct before width calculations.
* qt: Call parent class showEvent + override it explicit
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* qt: Let OptionsDialog emit a signal if appearance gets changed
* qt: Resize main toolbar depending on visible buttons / font attributes
* qt: Reset max width after it has been set to still allow window resizing
* qt: Properly update the weight of widgets with default font attributes
* qt: Handle updates to the font attributes
* qt: Use resize() instead of setMaximumWidth()
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* qt: Call GUIUtil::updateFonts in ModalOverlay constructor
* qt: Make sure default fonts are stored properly for the related widget
* qt: Ignore some low level classes in GUIUtil::updateFont
* rpc: Remove obsolete `.arg()` call
* qt: Drop fixedPitchFont
* qt: Avoid redundant font updates. Let GUIUtil::updateFont handle them
* qt: Scale recent transactions on OverviewPage
They were scaled by font inheritance before
* qt: Ignore QListView in GUIUtil::updateFonts
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Update nMinimumChainWork and defaultAssumeValid
* Update chainTxData
* Bump BLOCK_CHAIN_SIZE
It's 21Gb on my local machine atm, bumping to 25Gb to give it some space
* `gen-manpages.sh`
* bupm BLOCK_CHAIN_SIZE 25->30