Commit graph

37 commits

Author SHA1 Message Date
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
Russell Yanofsky
0d94e60625 refactor: Use DatabaseStatus and DatabaseOptions types
No changes in behavior. Just replaces arguments and return types
2020-09-03 12:24:32 -04: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
Hennadii Stepanov
2c7f5d8c2e
qt: Name WalletController worker QThread 2020-08-13 16:37:05 +03:00
MarcoFalke
4b30c41b4e
Merge #18927: Pass bilingual_str argument to AbortNode()
5527be0627 refactor: Add AbortError alias (Hennadii Stepanov)
d924f2a596 Drop MSG_NOPREFIX flag (Hennadii Stepanov)
083daf7fba Pass bilingual_str argument to AbortNode() (Hennadii Stepanov)
d1cca129b4 refactor: Use bilingual_str::empty() (Hennadii Stepanov)

Pull request description:

  This PR is a [followup](https://github.com/bitcoin/bitcoin/issues/16218#issuecomment-625919724) of #16224, and it adds `bilingual_str` type argument support to the `AbortNode()` functions.

ACKs for top commit:
  MarcoFalke:
    ACK 5527be0627 👟

Tree-SHA512: bf8b15b14912b1f672e6e588fffa1e6eb6f00b4b23d15d0ced7f18fbdf76919244427feb7217007fe29617049308e13def893a03a87358db819cca9692f59905
2020-06-16 08:53:02 -04:00
Hennadii Stepanov
d1cca129b4
refactor: Use bilingual_str::empty() 2020-06-04 18:32:38 +03:00
João Barbosa
f30960adc0 gui: Add closeAllWallets to WalletController 2020-06-01 00:54:00 +01:00
Hennadii Stepanov
78be8d97d3
util: Drop OpOriginal() and OpTranslated()
The current implementation of the Join() allows do not use OpOriginal()
and OpTranslated() unary operators at all.
2020-05-10 21:28:29 +03:00
MarcoFalke
fae51a5c6f
wallet: Avoid translating RPC errors when loading wallets
Common errors and warnings should be translated when displayed in the
GUI, but not translated when displayed elsewhere. The wallet method
CreateWalletFromFile does not know its caller, so this commit changes it
to return a bilingual_str to the caller.
2020-05-01 07:39:00 -04:00
Andrew Chow
82ae02b165 Be able to create new wallets with DescriptorScriptPubKeyMans as backing 2020-04-23 13:59:48 -04:00
MarcoFalke
fa488f131f
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-04-16 13:33:09 -04: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
João Barbosa
9eefc6e92f gui: Delete progress dialog instead of hidding it 2020-03-31 14:23:43 +01:00
João Barbosa
41b0baf43c gui: Handle WalletModel::unload asynchronous
This change prevents deleting a WalletModel instance while it's
being used.
2020-03-27 15:17:35 +00:00
Russell Yanofsky
1dca9dc4c7 refactor: Change createWallet, fillPSBT argument order
Move output arguments after input arguments for consistency with other methods,
and to work more easily with IPC framework in #10102
2020-03-19 15:26:04 -05: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
Hennadii Stepanov
5f50599ae7
refactor: Cleanup headers from walletmodel.h 2019-11-19 17:05:35 +02:00
Wladimir J. van der Laan
9bd109b78d
Merge #17120: gui: Fix start timer from non QThread
a8f5026d6d gui: Fix start timer from non QThread (João Barbosa)

Pull request description:

  Fixes #16296.

ACKs for top commit:
  laanwj:
    code review ACK a8f5026d6d

Tree-SHA512: d7b05ac88e188de16cbbe80cb2f773b7976ee07ee876ac94a93f9351856c4f3a9d66a531d3f3748d2dccff8c8d77d9d8227433069ed5909c32be2efeaa32f655
2019-10-26 13:00:16 +02:00
João Barbosa
a8f5026d6d gui: Fix start timer from non QThread 2019-10-14 10:53:33 +01:00
MarcoFalke
facec1c643
wallet: Avoid showing GUI popups on RPC errors 2019-10-08 13:02:14 -04:00
Jon Atack
cad3ab5db8
gui: fix autofocus in CreateWalletActivity::askPassphrase() 2019-09-09 11:04:32 +02:00
Jon Atack
539d9403af
gui: fix passphrase labels/tooltip in createwalletdialog/askpassphrasedialog
UI improvements:
- update remaining GUI wallet labels and tooltips from passwords to passphrases
- improve grammar of labels in askpassphrase dialog and WalletController::closeWallet
2019-09-09 10:57:38 +02:00
Jon Atack
43aa9b0d79
gui: rename encrypt(), blank(), and askPasshprase()
as well as disablePrivateKeys() to be consistent in naming.
2019-09-09 10:56:38 +02:00
Andrew Chow
1770a972d4 HTML escape the wallet name in more dialogs and notifications 2019-09-08 16:40:05 -04:00
Andrew Chow
9b41cbb28f Expose wallet creation to the GUI via WalletController
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2019-09-05 20:36:57 -04:00
João Barbosa
bc6d8a3662 gui: Refactor OpenWalletActivity 2019-09-06 00:05:07 +01:00
Hennadii Stepanov
6285a318d7
Remove redundant WalletController::addWallet slot 2019-07-09 16:30:56 +03:00
João Barbosa
64fee48944 qt: Assert QMetaObject::invokeMethod result 2019-07-08 21:30:25 +01:00
João Barbosa
fa90fe6440 refactor: Rename getWallets to getOpenWallets in WalletController 2019-07-08 15:07:17 +01:00
João Barbosa
224eb9534a gui: Sort wallets in open wallet menu 2019-07-08 15:03:49 +01:00
João Barbosa
a10972bc03 gui: Defer removeAndDeleteWallet when no modal widget is active 2019-03-22 09:51:04 +00:00
João Barbosa
a720a98301 gui: Fix async open wallet call order 2019-02-23 09:29:59 +00:00
João Barbosa
f77ba34313 gui: Add closeWallet to WalletController 2019-02-12 22:07:45 +00:00
João Barbosa
8847cdaaae gui: Add OpenWalletActivity 2019-02-04 12:23:40 +00:00
João Barbosa
be82dea23c gui: Add thread to run background activity in WalletController 2019-02-04 12:20:42 +00:00
João Barbosa
32a8c6abfe gui: Add openWallet and getWalletsAvailableToOpen to WalletController 2019-02-04 12:20:42 +00:00
João Barbosa
8fa271f089 gui: Add WalletController 2019-01-18 00:34:47 +00:00