Commit Graph

18416 Commits

Author SHA1 Message Date
UdjinM6
74f4d2a898
Merge pull request #3682 from xdustinface/backport-10244-18123
backport: bitcoin#10244, bitcoin#18123, bitcoin#12906 + Parts of bitcoin#11403
2020-10-14 20:22:55 +03:00
xdustinface
7cf7b53375 wallet: Respect chainlocks in CMerkleTx::IsLockedByInstantSend 2020-10-14 12:53:11 +01:00
xdustinface
4dca83ba25 wallet: Add CL/IS caches in CMerkleTx 2020-10-14 12:53:11 +01:00
UdjinM6
12c840f8ce Add mempool lock for Create/CommitTransaction in wallet interface
This is required to fix a (potential) deadlock
2020-10-14 12:53:11 +01:00
xdustinface
5020a68f33 qt|interfaces: Avoid redundant status update calls
- 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
2020-10-14 12:49:36 +01:00
xdustinface
cee8c151fa scripted-diff: Merge #12906: Avoid interface keyword to fix windows gitian build
17780d6f35 scripted-diff: Avoid `interface` keyword to fix windows gitian build (Russell Yanofsky)

Pull request description:

  Rename `interface` to `interfaces`

  Build failure reported by ken2812221 in https://github.com/bitcoin/bitcoin/pull/10244#issuecomment-379434756

Tree-SHA512: e02c97c728540f344202c13b036f9f63af23bd25e25ed7a5cfe9e2c2f201a12ff232cc94a93fbe37ef6fb6bf9e036fe62210ba798ecd30de191d09338754a8d0

-BEGIN VERIFY SCRIPT-
git mv src/interface src/interfaces
ren() { git grep -l "$1" | xargs sed -i "s,$1,$2,g"; }
ren interface/            interfaces/
ren interface::           interfaces::
ren BITCOIN_INTERFACE_    BITCOIN_INTERFACES_
ren "namespace interface" "namespace interfaces"
-END VERIFY SCRIPT-
2020-10-14 12:10:12 +01:00
xdustinface
7ab1051bf0 Partially backport bitcoin#11403 2020-10-14 12:10:11 +01:00
xdustinface
79d32b5b9e test: Fix wallet tests 2020-10-14 12:10:11 +01:00
Jonas Schnelli
7c6cecaf29 Merge #18123: gui: Fix race in WalletModel::pollBalanceChanged
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
2020-10-14 12:10:11 +01:00
xdustinface
6088650438 test: Add boost/signals2/connection.hpp to lint-inlcudes.sh 2020-10-14 12:10:11 +01:00
xdustinface
1a5a1ca78a interface/qt: Remove direct src/privatesend calls
Refactored into interface::PrivateSend::Options and
interface::PrivateSend::Client
2020-10-14 12:09:45 +01:00
Konstantin Shuplenkov
5f2305e5c8
build: create mountpoint for named volume (#3765) 2020-10-08 14:34:33 +03:00
xdustinface
555a184a6a interface/qt: Remove direct src/masterode calls
Refactored into interface::Node::Masternode
2020-10-05 15:41:38 +02:00
xdustinface
e24b6228ad interface/qt: Remove direct src/llmq calls
Refactored into interface::Node::LLMQ
2020-10-05 15:13:34 +02:00
xdustinface
6c900725c2 interface/qt: Remove direct src/evo calls
Refactored into interface::Node::EVO
2020-10-05 15:13:34 +02:00
xdustinface
3139459c71 qt|privatesend: Remove unused wallet inlcudes 2020-10-05 15:13:34 +02:00
xdustinface
07600d9aa7 qt: Cleanup in OptionsDialog
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.
2020-10-05 15:13:34 +02:00
Russell Yanofsky
ce41506a3e Add developer notes about blocking GUI code 2020-10-05 15:13:34 +02:00
Russell Yanofsky
1133dfc1ce Use WalletBalances struct in Qt
Suggested by John Newbery <john@johnnewbery.com>
https://github.com/bitcoin/bitcoin/pull/10244#discussion_r177504284
2020-10-05 15:13:34 +02:00
Russell Yanofsky
8549622027 Remove direct bitcoin calls from qt/sendcoinsdialog.cpp 2020-10-05 15:13:34 +02:00
Russell Yanofsky
e4e00cbbdd Remove direct bitcoin access from qt/guiutil.cpp 2020-10-05 15:13:34 +02:00
Russell Yanofsky
155324e867 Remove direct bitcoin calls from qt transaction table files 2020-10-05 15:13:34 +02:00
Russell Yanofsky
b2f7e1d1eb Remove direct bitcoin calls from qt/paymentserver.cpp 2020-10-05 15:13:34 +02:00
Russell Yanofsky
50f7d661ab Remove direct bitcoin calls from qt/addresstablemodel.cpp 2020-10-05 15:13:34 +02:00
Russell Yanofsky
7bb2d25c3d Remove direct bitcoin calls from qt/coincontroldialog.cpp 2020-10-05 15:13:34 +02:00
Russell Yanofsky
bda6fc4be9 Remove most direct bitcoin calls from qt/walletmodel.cpp 2020-10-05 15:13:31 +02:00
PastaPastaPasta
204df7bc6e
update public part of windows code signing certificate (#3749)
* 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>
2020-10-05 14:57:01 +03:00
Oleg Girko
ba35dae02d
depends: Update Qt download url. (#3756)
Signed-off-by: Oleg Girko <ol@infoserver.lv>

Co-authored-by: Oleg Girko <ol@infoserver.lv>
2020-10-05 14:56:15 +03:00
Russell Yanofsky
6298c97c29 Remove direct bitcoin calls from qt/optionsdialog.cpp 2020-10-05 02:01:17 +02:00
Russell Yanofsky
a19c1f8b88 Remove direct bitcoin calls from qt/rpcconsole.cpp 2020-10-05 02:01:17 +02:00
Russell Yanofsky
80286d777a Remove direct bitcoin calls from qt/bantablemodel.cpp 2020-10-05 02:01:17 +02:00
Russell Yanofsky
59cec79288 Remove direct bitcoin calls from qt/peertablemodel.cpp 2020-10-05 02:01:17 +02:00
Russell Yanofsky
5512eca39c Remove direct bitcoin calls from qt/intro.cpp 2020-10-05 02:01:15 +02:00
Russell Yanofsky
7fe386a00f Remove direct bitcoin calls from qt/clientmodel.cpp 2020-10-03 21:36:31 +02:00
Russell Yanofsky
2856f46424 Remove direct bitcoin calls from qt/splashscreen.cpp 2020-10-03 21:36:31 +02:00
Russell Yanofsky
2fdf3d8c64 Remove direct bitcoin calls from qt/utilitydialog.cpp 2020-10-03 21:36:31 +02:00
Russell Yanofsky
50f1a6205e Remove direct bitcoin calls from qt/bitcoingui.cpp 2020-10-03 21:36:31 +02:00
Russell Yanofsky
f45e095566 Remove direct bitcoin calls from qt/optionsmodel.cpp 2020-10-03 21:36:27 +02:00
Russell Yanofsky
e709f5a45e Remove direct bitcoin calls from qt/bitcoin.cpp 2020-10-03 21:17:37 +02:00
Russell Yanofsky
98473af332 Add src/interface/README.md 2020-10-03 21:17:37 +02:00
dustinface
b8d1a4f315
qt: Make sure there is a valid theme set in the options (#3755)
* qt: Add GUIUtil::isValidTheme()

Check if a given string is a valid theme.

* qt: Make sure there is a valid theme set in the options
2020-10-02 22:50:17 +03:00
UdjinM6
81ce9c451a
qt: More asset cleanup (#3735)
* 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
2020-09-30 16:08:11 +03:00
UdjinM6
1624c681df
Always harden osx binaries when creating detached sigs (#3752)
This is required for macos app notarization https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution
2020-09-30 15:32:24 +03:00
thephez
73d8805dc9
contrib: Added thephez.pgp (#3750) 2020-09-30 15:30:55 +03:00
PastaPastaPasta
7058fd7dfc
test: Optimize feature_block_reward_reallocation.py (#3743)
* 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>
2020-09-30 15:30:20 +03:00
dustinface
24dfb64c9f
qt: Fix font family updates (#3746)
* 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>
2020-09-29 04:09:20 +03:00
UdjinM6
b3d3b48cba
qt: Fix Recent transactions list height (#3744)
* 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
2020-09-29 02:16:03 +03:00
dustinface
4cb2af80b1
qt: Fix font size and scaling issues (#3734)
* 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>
2020-09-29 02:15:20 +03:00
UdjinM6
e117a2fee7
Translations 2020-09 (#3736)
* Update dash_en and dashstrings

* ru

* fi, vi

* 98.94%: ar, de, es, fr, it, ko, nl, pl, th, zh_TW

* >80%: ja, pt, ro, sk, tr, zh_CN

* 100%: pt, tr

* ~98%: zh_CN
2020-09-28 21:53:37 +03:00
UdjinM6
b441e31ecb
Bump few things and update man pages for v0.16 (#3737)
* 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
2020-09-28 19:53:41 +03:00