Commit graph

424 commits

Author SHA1 Message Date
Ross Nicoll b2554af0df Bitcoin Core 0.21.2 release candidate 2
Tree-SHA512: 7bcdf6c42ac75fb24df8d6b60bddcac5f14363a3f7dd89a239f798bb14b5c911c2d7535a0372c2998719d33a561d0d28b0b6764aaf1f2ec330d4035ce965997b
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEz7FuIclQ9n+pXlWPLuufXMCVJsEFAmEp9EoACgkQLuufXMCV
 JsGvcQ//ZSQOCEFH3e+gBuXHthXG2UZsHagC715ruQquhRt4aOKiFLu/eJGwiKBt
 Frc1wLF21dgtl/2JUtVBpVb54whni1PKgDowtkk4Ge7gWM0awW2OnvdgA21E+syD
 501duaW6ORvo5icmf7uPQ7u/g9Ks1s1chBr1bLnYqqqg2e3/aqC4+drTjd8wziy3
 J+8Bzc+KLAklgv8cIpH1EDuFGrumlMYxW0KHqJeN7Vk8wGX8PINrkEGCyrBDQ7DY
 BEd6txwcivPxqMfj61OP60DU0oG6IVECGMPrANtyK+ba0FHl+GkNQuTaX8zv4Ik9
 dKscJ1OiRX2ER/pEJTwg8PJfOET5D/WRc1xSmrYBOK7cFLtYVqH2yvnHiLlWvH1P
 7TQOAjfzQwa+yUnGRf2dWW+Rngv876JjBUX5vbm4UC5Geo8Bdl3z9U9glaq03fVd
 3Q8uAgljLnXWFiylK9oDYhsFfWSUYgjyhM11LCb5K3y3t7ageclu6RTl574jy5sb
 8qBwQxpJt5UtwIK2SNqq1iDmMW3J65sb3CmTND9ppDA79GfZzwlvGVwO1bN2TC6m
 0dGTPvOPWS9x/PSq8+8o1uCHDzHrW9B5lUikf8kx+zNI7Rd3QLJ0pbdqwrJ3CcOk
 ttV5QXAYD2trfkCKEi69eiIpH21rasqjyI11ZoH4u+0BCpw8hQg=
 =GXjC
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.2rc2' into 1.21-dev

Bitcoin Core 0.21.2 release candidate 2

Tree-SHA512: 7bcdf6c42ac75fb24df8d6b60bddcac5f14363a3f7dd89a239f798bb14b5c911c2d7535a0372c2998719d33a561d0d28b0b6764aaf1f2ec330d4035ce965997b
2021-09-03 13:40:49 +01:00
barrystyle 8f77f8870d
1.21 codebase rebrand (#1711)
* build: Brand codebase as Dogecoin via automake/autoconf files.
* build: Update internal resource files for windows builds.
* build: Update internal application names and data directories.
* build: Update immediately visible remaining bitcoin name references from cli binaries and qt.
* build: Update immediately visible bitcoin references in the main gui itself.
* Update functional tests to match Dogecoin
* wallet: Add missing check for -descriptors wallet tool option
* correct output for functional tests (errorlevels?)

Co-authored-by: Ross Nicoll <ross.nicoll@r3.com>
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2021-02-20 12:13:43 +00:00
Hennadii Stepanov 6dc58e9945 qt: Use "fusion" style on macOS Big Sur with old Qt
The "macintosh" style is broken on macOS Big Sur at least for Qt 5.9.8.

Github-Pull: #bitcoin-core/gui#177
Rebased-From: 4e1154dfd128cbada65e9ea08ee274cdeafc4c53
2021-01-28 10:15:59 +01:00
Jonas Schnelli 9453fbf5a0
Merge #20: Wrap tooltips in the intro window
6ed4bcabc1 qt: Wrap tooltips in the intro window (Hennadii Stepanov)

Pull request description:

  On master (d6fe5b28df):

  ![DeepinScreenshot_select-area_20200702082514](https://user-images.githubusercontent.com/32963518/86319852-18e6e200-bc3e-11ea-902c-1b868540f4cf.png)

  With this PR:

  ![Screenshot from 2020-07-02 08-22-44](https://user-images.githubusercontent.com/32963518/86319881-28fec180-bc3e-11ea-9d76-522a5e71c32d.png)

  ---

  This is a move-only change.

  This was done while reviewing #15.

ACKs for top commit:
  jonasschnelli:
    utACK 6ed4bcabc1

Tree-SHA512: 67507c8c5628cd95fe8e377ce21e2c23d305faf1affa0b7579885553c20055ba07ed61e2aed3230d7cd22c3c90f76e0c58cb3238be9f153a8ca6e6d4e38753b0
2020-10-22 21:26:00 +02:00
MarcoFalke faf0a26711
doc: Update comments for new chain settings (-signet and -chain=signet) 2020-09-22 22:32:25 +02:00
fanquake 83b23848f7
Merge #18790: gui: Improve thread naming
ead771bf6f qt: Rename qt-init thread before logging start (Hennadii Stepanov)
ad5f614bf3 qt: Name ClientModel timer QThread (Hennadii Stepanov)
2c7f5d8c2e qt: Name WalletController worker QThread (Hennadii Stepanov)
27dcc37d42 qt: Name RPCConsole executor QThread (Hennadii Stepanov)

Pull request description:

  On **master** (eef90c14ed):
  - thread list from OS:
  ![Screenshot from 2020-04-28 00-25-41](https://user-images.githubusercontent.com/32963518/80425413-3de07100-88ec-11ea-8d7a-79bd9e152395.png)
  - log excerpt:
  ```
  2020-04-27T21:25:26Z [] GUI: initialize : Running initialization in thread
  ...
  2020-04-27T21:26:04Z [] Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
  2020-04-27T21:26:04Z [] Using wallet /home/hebasto/.bitcoin/testnet3/wallets/test2
  2020-04-27T21:26:04Z [] BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/test2/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/test2/db.log
  2020-04-27T21:26:04Z [] init message: Loading wallet...
  2020-04-27T21:26:04Z [] BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/test2/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/test2/db.log
  2020-04-27T21:26:04Z [] [test2] Wallet File Version = 169900
  2020-04-27T21:26:04Z [] [test2] Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0
  2020-04-27T21:26:04Z [] [test2] Wallet completed loading in              26ms
  2020-04-27T21:26:04Z [] GUI: TransactionTablePriv::refreshWallet
  2020-04-27T21:26:04Z [] [test2] setKeyPool.size() = 2000
  2020-04-27T21:26:04Z [] [test2] mapWallet.size() = 0
  2020-04-27T21:26:04Z [] [test2] m_address_book.size() = 0
  ```

  With **this PR**:
  - thread list from OS:
  ![Screenshot from 2020-04-28 00-21-40](https://user-images.githubusercontent.com/32963518/80425527-7a13d180-88ec-11ea-8a34-dfc774bb1c75.png)
  - log excerpt:
  ```
  2020-04-27T21:21:25Z [qt-init] GUI: initialize : Running initialization in thread
  ...
  2020-04-27T21:23:08Z [qt-walletctrl] Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
  2020-04-27T21:23:08Z [qt-walletctrl] Using wallet /home/hebasto/.bitcoin/testnet3/wallets/test2
  2020-04-27T21:23:08Z [qt-walletctrl] BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/test2/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/test2/db.log
  2020-04-27T21:23:08Z [qt-walletctrl] init message: Loading wallet...
  2020-04-27T21:23:08Z [qt-walletctrl] BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/test2/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/test2/db.log
  2020-04-27T21:23:08Z [qt-walletctrl] [test2] Wallet File Version = 169900
  2020-04-27T21:23:08Z [qt-walletctrl] [test2] Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0
  2020-04-27T21:23:08Z [qt-walletctrl] [test2] Wallet completed loading in              37ms
  2020-04-27T21:23:08Z [qt-walletctrl] init message: Rescanning...
  2020-04-27T21:23:08Z [qt-walletctrl] [test2] Rescanning last 112924 blocks (from block 1609206)...
  2020-04-27T21:23:08Z [qt-walletctrl] [test2] Rescan started from block 000000000000003761c81f7efbd8cebf217f39d353ec1ac59c624ac2dddfc2a8...
  2020-04-27T21:23:22Z [qt-walletctrl] [test2] Rescan completed in           14157ms
  2020-04-27T21:23:22Z [qt-walletctrl] GUI: TransactionTablePriv::refreshWallet
  2020-04-27T21:23:22Z [qt-walletctrl] [test2] setKeyPool.size() = 2000
  2020-04-27T21:23:22Z [qt-walletctrl] [test2] mapWallet.size() = 0
  2020-04-27T21:23:22Z [qt-walletctrl] [test2] m_address_book.size() = 0
  ```

ACKs for top commit:
  Sjors:
    tACK ead771bf6f

Tree-SHA512: a3b2789990414ab23b69236ca36b656a3f026e11e88fb5940ef4fecfc2053df5ed886615afb37f98584f6e19b953209d3884baab057740b2e9eed68661880dd3
2020-09-19 16:28:04 +08:00
MarcoFalke 269a7ccb27
Merge #19099: refactor: Move wallet methods out of chain.h and node.h
24bf17602c gui refactor: Inline SplashScreen::ConnectWallet (Russell Yanofsky)
e4f4350471 refactor: Move wallet methods out of chain.h and node.h (Russell Yanofsky)
b266b3e0bf refactor: Create interfaces earlier during initialization (Russell Yanofsky)

Pull request description:

  Add WalletClient interface so node interface is cleaner and don't need wallet-specific methods.

  The new NodeContext::wallet_client pointer will also be needed to eliminate global wallet variables like ::vpwallets in #19101, because createWallet(), loadWallet(), getWallets(), etc methods called by the GUI need a way to get a reference to the list of open wallets if it is no longer a global variable.

ACKs for top commit:
  promag:
    Code review ACK 24bf17602c.
  MarcoFalke:
    ACK 24bf17602c 🐚

Tree-SHA512: a70d3776cd6723093db8912028c50075ec5fa0a48b961cb1a945f922658f5363754f8380dbb8378ed128c8c858913024f8264740905b8121a35c0d63bfaed7cf
2020-08-31 10:10:57 +02:00
MarcoFalke baf9cedee8
Merge #18817: doc: Document differences in bitcoind and bitcoin-qt locale handling
ca185cf5a1 doc: Document differences in bitcoind and bitcoin-qt locale handling (practicalswift)

Pull request description:

  Document differences in `bitcoind` and `bitcoin-qt` locale handling.

  Since this seems to be the root cause to the locale dependency issues we've seen over the years I thought it was worth documenting :)

  Note that 1.) `QLocale` (used by Qt), 2.) C locale (used by locale-sensitive C standard library functions/POSIX functions and some parts of the C++ standard library such as `std::to_string`) and 3.) C++ locale (used by the C++ input/output library) are three separate things. This comment is about the perhaps surprising interference with the C locale (2) that takes place as part of the Qt initialization.

ACKs for top commit:
  hebasto:
    re-ACK ca185cf5a1

Tree-SHA512: e51c32f3072c506b0029a001d8b108125e1acb4f2b6a48a6be721ddadda9da0ae77a9b39ff33f9d9eebabe2244c1db09e8502e3e7012d7a5d40d98e96da0dc44
2020-08-29 10:03:45 +02:00
practicalswift ca185cf5a1 doc: Document differences in bitcoind and bitcoin-qt locale handling 2020-08-29 01:55:27 +00:00
Russell Yanofsky e4f4350471 refactor: Move wallet methods out of chain.h and node.h
Add WalletClient interface so node interface is cleaner and don't need
wallet-specific methods.

The new NodeContext::wallet_client pointer will also be needed to eliminate
global wallet variables like ::vpwallets, because createWallet(), loadWallet(),
getWallets(), etc methods called by the GUI need a way to get a reference to
the list of open wallets if it is no longer a global variable.

Also tweaks splash screen registration for load wallet events to be delayed
until after wallet client is created.
2020-08-27 14:33:00 -04:00
Russell Yanofsky 519cae8fd6 gui: Delay interfaces::Node initialization
This is needed to allow bitcoin-gui to connect to existing node process with
-ipcconnect instead of spawning a new process. It's possible to spawn a new
bitcoin-node process without knowing the current data dir or network, but
connecting to an existing bitcoin-node requires knowing the datadir and network
first.
2020-08-26 05:52:31 -04:00
Russell Yanofsky 102abff9eb gui: Replace interface::Node references with pointers
No change in behavior. Replacing references with pointers allows Node interface
creation to be delayed until later during gui startup next commit to support
implementing -ipcconnect option
2020-08-26 05:52:31 -04:00
Russell Yanofsky 91aced7c7e gui: Remove unused interfaces::Node references
Remove Node references no longer needed after previous commit
2020-08-26 05:52:31 -04:00
Russell Yanofsky e133631625 gui: Partially revert #10244 gArgs and Params changes
Change gui code to use gArgs, Params() functions directly instead of going
through interfaces::Node.

Remotely accessing bitcoin-node ArgsManager from bitcoin-gui works fine in
https://github.com/bitcoin/bitcoin/pull/10102, when bitcoin-gui spawns a new
bitcoin-node process and controls its startup, but for bitcoin-gui to support
-ipcconnect option in https://github.com/bitcoin/bitcoin/pull/19461 and connect
to an existing bitcoin-node process, it needs ability to parse arguments itself
before connecting out.

This change also simplifies https://github.com/bitcoin/bitcoin/pull/10102 a
bit, by making the bitcoin-gui -> bitcoin-node startup sequence more similar to
the bitcoin-node -> bitcoin-wallet startup sequence where the parent process
parses arguments and passes them to the child process instead of the parent
process using the child process to parse arguments.
2020-08-26 05:52:31 -04:00
Hennadii Stepanov ead771bf6f
qt: Rename qt-init thread before logging start 2020-08-13 16:40:03 +03:00
Jonas Schnelli 386ec192a5 Reduce cs_main lock accumulation during GUI startup 2020-08-12 16:44:09 +02:00
MarcoFalke 4b705b1c98
Merge #19098: test: Remove duplicate NodeContext hacks
edc316020e test: Remove duplicate NodeContext hacks (Russell Yanofsky)

Pull request description:

  Qt tests currently are currently using two NodeContext structs at the same time, one in interfaces::NodeImpl::m_context, and the other in BasicTestingSetup::m_node, and the tests have hacks transferring state between them.

  Fix this by getting rid of the NodeImpl::m_context struct and making it a pointer. This way a common BitcoinApplication object can be used for all qt tests, but they can still have their own testing setups.

  Non-test code is changing but non-test behavior is still the same as before.

  Motivation for this PR is to be able to remove the "std::move(test.m_node.connman)" and mempool hacks for swapping individual NodeContext members in Qt tests, because followup PR #19099 adds yet another member (wallet_client) that needs to be swapped. After this change, the whole NodeContext struct can be swapped instead of individual members, so the workarounds are less fragile and invasive.

ACKs for top commit:
  MarcoFalke:
    crACK edc316020e 🌮
  promag:
    ACK edc316020e.

Tree-SHA512: c1650e4127f43a4020304ca7c13b5d9122fb5723aacd8fa1cf855d03c6052fcfb7685810aa2a5ef708561015f0022fecaacbad479295104ca45d2c17579466a4
2020-08-07 08:07:37 +02:00
Hennadii Stepanov 6ed4bcabc1
qt: Wrap tooltips in the intro window 2020-08-01 13:39:19 +03:00
Ivan Metlushko 9b20f66828 scripted-diff: Replace gArgs with local argsman
-BEGIN VERIFY SCRIPT-
sed -i -e 's/gArgs.Add/argsman.Add/g' `git grep -l "gArgs.Add"`
-END VERIFY SCRIPT-
2020-07-29 16:39:00 +07:00
Ivan Metlushko a316e9ce26 refactor: add unused ArgsManager to replace gArgs 2020-07-29 16:36:44 +07:00
MarcoFalke f4cfa6d019
Merge #15935: Add <datadir>/settings.json persistent settings storage
9c69cfe4c5 Add <datadir>/settings.json persistent settings storage. (Russell Yanofsky)
eb682c5700 util: Add ReadSettings and WriteSettings functions (Russell Yanofsky)

Pull request description:

  Persistent settings are used in followup PRs #15936 to unify gui settings between bitcoin-qt and bitcoind, and #15937 to add a load_on_startup flag to the loadwallet RPC and maintain a dynamic list of wallets that should be loaded on startup that also can be shared between bitcoind and bitcoin-qt.

ACKs for top commit:
  MarcoFalke:
    Approach re-ACK 9c69cfe4c5 🌾
  jnewbery:
    utACK 9c69cfe4c5

Tree-SHA512: 39fcc6051717117c9141e934de1d0d3f739484be4685cdf97d54de967c8c816502b4fd0de12114433beaa5c5b7060c810fd8ae4e2b3ce7c371eb729ac01ba2e1
2020-07-23 18:39:42 +02:00
Wladimir J. van der Laan d626a3be31
Merge #19210: qt: Get rid of cursor in out-of-focus labels
bd315eb5e2 qt: Get rid of cursor in out-of-focus labels (Hennadii Stepanov)

Pull request description:

  After clicking on `QLabel` with selectable text the cursor remains forever:

  ![47532924-65e7b200-d8ba-11e8-9254-7bde658961cb](https://user-images.githubusercontent.com/32963518/84038485-ad945200-a9a8-11ea-89e3-c7c17d02a611.png)

  This PR fixes this visual bug.

  Earlier attempts to fix this issue:
  - #14577
  - #14810 (combined with other UX feature)

ACKs for top commit:
  promag:
    Code review ACK bd315eb5e2.
  laanwj:
    Tested ACK bd315eb5e2

Tree-SHA512: 6bf89362412e5ce9a4dec6944b62fe44fc31ca49cda7f6e2eb37e847fac9dccb68bca7ac6877b19e42add2333e40d0b4265757ead105ac0a5d28f8ab43b322c3
2020-07-15 16:48:03 +02:00
Russell Yanofsky edc316020e test: Remove duplicate NodeContext hacks
Qt tests currently are currently using two NodeContext structs at the same
time, one in interfaces::NodeImpl::m_context, and the other in
BasicTestingSetup::m_node, and the tests have hacks transferring state between
them.

Fix this by getting rid of the NodeImpl::m_context struct and making it a
pointer. This way a common BitcoinApplication object can be used for all qt
tests, but they can still have their own testing setups.

Non-test code is changing but non-test behavior is still the same as before.

Motivation for this PR is to be able to remove the
"std::move(test.m_node.connman)" and mempool hacks for swapping individual
NodeContext members in Qt tests, because followup PR #19099 adds yet another
member (wallet_client) that needs to be swapped. After this change, the whole
NodeContext struct can be swapped instead of individual members, so the
workarounds are less fragile and invasive.
2020-07-13 04:34:27 -04:00
Russell Yanofsky 9c69cfe4c5 Add <datadir>/settings.json persistent settings storage.
Persistent settings are used in followup PRs #15936 to unify gui settings
between bitcoin-qt and bitcoind, and #15937 to add a load_on_startup flag to
the loadwallet RPC and maintain a dynamic list of wallets that should be loaded
on startup that also can be shared between bitcoind and bitcoin-qt.
2020-07-11 05:41:12 -04:00
Hennadii Stepanov bd315eb5e2
qt: Get rid of cursor in out-of-focus labels
This change is a temporary fix of QTBUG-59514.
2020-07-03 18:29:24 +03:00
MarcoFalke fa72ca6a9d
qt: Remove unused includes 2020-06-27 11:39:23 -04:00
Hennadii Stepanov d1ae7c0355
Make GetWarnings() return bilingual_str 2020-06-10 15:01:20 +03:00
fanquake 948f1134bc
gui: add missing translation.h include to fix build
After #19176, building the gui on Bionic is failing with:

```bash
  CXX      qt/qt_libbitcoinqt_a-guiutil.o
qt/bitcoin.cpp: In function 'int GuiMain(int, char**)':
qt/bitcoin.cpp:460:35: error: 'Untranslated' was not declared in this scope
node->initError(strprintf(Untranslated("Error parsing command line arguments: %s\n"), error));
```

The merge commit also failed to compile with the same error:
https://travis-ci.org/github/bitcoin/bitcoin/jobs/696627543
2020-06-10 10:08:16 +08:00
Wladimir J. van der Laan 6fe989054f refactor: Change Node::initError to take bilingual_str
Make it consistent with `Chain::initError`.
2020-06-09 15:40:02 +02:00
MarcoFalke 3e58734e55
Merge #18898: gui: Display warnings as rich text
a9d28afe23 qt: Display warnings as rich text (Hennadii Stepanov)

Pull request description:

  On master (6621be5351), warnings that contain `<hr />` HTML tag are not displayed correctly:

  ![Screenshot from 2020-05-06 11-30-10](https://user-images.githubusercontent.com/32963518/81177281-0e49fc80-8faf-11ea-8cac-8847aa517e86.png)

  Fixed:

  ![Screenshot from 2020-05-07 07-30-48](https://user-images.githubusercontent.com/32963518/81255618-ca9ad580-9036-11ea-90ad-7f4d89c1880d.png)

ACKs for top commit:
  jonasschnelli:
    utACK a9d28afe23
  promag:
    Code review ACK a9d28afe23.

Tree-SHA512: ba5b3837d5f6ea15c3255a3120c9753fc58ee67a370c388556214048ab993c45be720af7cb8d43bb0f12088956cb78abc77546ed1fc691082880438072fe774b
2020-06-08 09:54:38 -04:00
Jonas Schnelli 44307449f7
Merge #19104: gui, refactor: Register Qt meta types in application constructor
4f49d5222e gui, refactor: Register Qt meta types in application constructor (João Barbosa)

Pull request description:

  Removes a warning when running `QT_QPA_PLATFORM=cocoa src/qt/test/test_bitcoin-qt`.

ACKs for top commit:
  jonasschnelli:
    Re utACK 4f49d5222e
  hebasto:
    ACK 4f49d5222e, tested on macOS 10.15.5.

Tree-SHA512: e931a022ba83cb0ef04d82544ebd9b18242f8fc2b41443afce4d5c4222f222e8b3517bdb484a1a4f61377c5dceca067d8ccf250da3a727299448e54bec33ed6e
2020-06-02 08:48:04 +02:00
João Barbosa 4f49d5222e gui, refactor: Register Qt meta types in application constructor 2020-05-29 16:05:47 +01:00
Jonas Schnelli d7f5e01e30
Merge #18424: qt: Use parent-child relation to manage lifetime of OptionsModel object
8e08d00598 qt: Use parent-child relation to manage lifetime of OptionsModel object (Hennadii Stepanov)

Pull request description:

  Both `BitcoinApplication` and `OptionsModel` classes are derived from the `QObject` class, therefore a parent-child relation could be established to manage the lifetime of an `OptionsModel` object:
  5236b2e267/src/qt/optionsmodel.cpp (L29-L30)

  This PR does not change behavior.

ACKs for top commit:
  jonasschnelli:
    utACK 8e08d00598
  promag:
    ACK 8e08d00598.

Tree-SHA512: 0223dddf5ba28b0bfaefeda1b03b4ff95bf7e7d0c1e7b32368171e561813e22129f2a664f09279fa3b4fa63259b7680d55aa3fe66db9c7ae0039b7f529777ec3
2020-05-29 11:09:09 +02:00
Hennadii Stepanov 06d519f0b4
qt: Add SynchronizationState enum to signal parameter 2020-05-19 03:01:42 +03:00
Hennadii Stepanov a9d28afe23
qt: Display warnings as rich text 2020-05-07 07:41:01 +03:00
fanquake 1b04302e43
gui: use PACKAGE_NAME in exception message 2020-04-15 15:35:47 +08:00
MarcoFalke 3eb8b1c392
Merge #17905: gui: Avoid redundant tx status updates
96cb597325 gui: Avoid redundant tx status updates (Russell Yanofsky)

Pull request description:

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10).

  In `TransactionTablePriv::index`, avoid calling `interfaces::Wallet::tryGetTxStatus` if the status is up to date as of the most recent `NotifyBlockTip` notification.  Store height from the most recent notification in a new `ClientModel::cachedNumBlocks` variable in order to check this.

  This avoids floods of IPC traffic from `tryGetTxStatus` with #10102 when there are a lot of transactions. It might also make the GUI a little more efficient even when there is no IPC.

ACKs for top commit:
  promag:
    Code review ACK 96cb597325.
  hebasto:
    ACK 96cb597325

Tree-SHA512: fce597bf52a813ad4923110d0a39229ea09e1631e0d580ea18cffb09e58cdbb4b111a40a9a9270ff16d8163cd47b0bd9f1fe7e3a6c7ebb19198f049f8dd1aa46
2020-04-10 16:34:30 -04:00
Hennadii Stepanov 8e08d00598 qt: Use parent-child relation to manage lifetime of OptionsModel object
Both BitcoinApplication and OptionsModel classes are derived from the
QObject class, therefore a parent-child relation could be established to
manage the lifetime of an OptionsModel object.
This commit does not change behavior.
2020-03-24 22:53:07 +02:00
Hennadii Stepanov 219417b388
Revert "refactor: Simplify connection syntax"
This reverts commit 1a53b0da60.
2020-01-19 09:37:34 +02:00
Hennadii Stepanov 1a53b0da60
refactor: Simplify connection syntax 2020-01-16 20:44:21 +02:00
MarcoFalke e09c701e01 scripted-diff: Bump copyright of files changed in 2020
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-01-15 02:18:00 +07:00
Russell Yanofsky 96cb597325 gui: Avoid redundant tx status updates
In TransactionTablePriv::index, avoid calling
interfaces::Wallet::tryGetTxStatus if the status is up to date as of the most
recent NotifyBlockTip notification.  Store height from the most recent
notification in a new ClientModel::cachedNumBlocks variable in order to check
this.

This avoids floods of IPC traffic from tryGetTxStatus with #10102 when there
are a lot of transactions. It might also make the GUI a little more efficient
even when there is no IPC.
2020-01-09 16:05:35 -04:00
fanquake 7f3675b3ce
Merge #17696: qt: Force set nPruneSize in QSettings after the intro dialog
af112ab628 qt: Rename SetPrune() to InitializePruneSetting() (Hennadii Stepanov)
b0bfbe5028 refactor: Drop `bool force' parameter (Hennadii Stepanov)
68c9bbe9bc qt: Force set nPruneSize in QSettings after intro (Hennadii Stepanov)
a82bd8fa57 util: Replace magics with DEFAULT_PRUNE_TARGET_GB (Hennadii Stepanov)

Pull request description:

  On master (5622d8f315), having `QSettings` set already
  ```
  $ grep nPruneSize ~/.config/Bitcoin/Bitcoin-Qt-testnet.conf
  nPruneSize=6
  ```

  enabling prune option in the intro dialog

  ```
  $ ./src/qt/bitcoin-qt -choosedatadir -testnet
  ```
  ![DeepinScreenshot_select-area_20191208120425](https://user-images.githubusercontent.com/32963518/70388183-eed68580-19b6-11ea-9aa1-f9ad9aaa68a6.png)

  has no effect:
  ```
  $ grep Prune ~/.bitcoin/testnet3/debug.log
  2019-12-08T10:04:41Z Prune configured to target 5722 MiB on disk for block and undo files.
  ```

  ---

  With this PR:
  ```
  $ grep Prune ~/.bitcoin/testnet3/debug.log
  2019-12-08T10:20:35Z Prune configured to target 1907 MiB on disk for block and undo files.
  ```

  This PR has been split of #17453 (the first two commits) as it fixes an orthogonal bug.

  Refs:
  - https://github.com/bitcoin/bitcoin/pull/17453#discussion_r345424240
  - https://github.com/bitcoin/bitcoin/pull/17453#discussion_r350960201

ACKs for top commit:
  Sjors:
    Code review re-ACK af112ab628
  ryanofsky:
    Code review ACK af112ab628. Just suggested changes since last review (thanks!)
  promag:
    Tested ACK af112ab628. Latest suggestions and changes look good to me.

Tree-SHA512: 8ddad34b30dcc2cdcad6678ba8a0b36fa176e4e3465862ef6eee9be0f98d8146705138c9c7995dd8c0990af41078ca743fef1a90ed9240081f052f32ddec72b9
2020-01-08 22:03:49 +08:00
Hennadii Stepanov af112ab628
qt: Rename SetPrune() to InitializePruneSetting()
This function now resets the prune size and is only called after the
intro sequence.
2020-01-08 00:16:37 +02:00
Hennadii Stepanov b0bfbe5028
refactor: Drop `bool force' parameter 2020-01-08 00:14:56 +02:00
Hennadii Stepanov 68c9bbe9bc
qt: Force set nPruneSize in QSettings after intro
If QSettings is set already, it is required to force set nPruneSize
after the intro dialog.
2020-01-08 00:12:32 +02:00
Hennadii Stepanov a004673c54
qt: Add LogQtInfo() function 2020-01-05 23:40:01 +02:00
John Newbery 869b6314fd [qt] remove unused parameter from getWarnings() 2019-12-15 13:23:30 -03:00
Hennadii Stepanov 1828c6f05f
refactor: Styling w/ clang-format, comment update 2019-11-10 12:11:07 +02:00
Hennadii Stepanov 88a94f7bb8
qt: Fix missing qRegisterMetaType for size_t
It is required in order to use size_t in QueuedConnections.
2019-11-10 12:03:53 +02:00