aboutsummaryrefslogtreecommitdiff
path: root/src/qt
AgeCommit message (Collapse)Author
2020-08-07Merge #19098: test: Remove duplicate NodeContext hacksMarcoFalke
edc316020e8270dafc5e31465d532baebdafd3dd 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 edc316020e8270dafc5e31465d532baebdafd3dd 🌮 promag: ACK edc316020e8270dafc5e31465d532baebdafd3dd. Tree-SHA512: c1650e4127f43a4020304ca7c13b5d9122fb5723aacd8fa1cf855d03c6052fcfb7685810aa2a5ef708561015f0022fecaacbad479295104ca45d2c17579466a4
2020-07-30Merge #19604: Pass mempool pointer to UnloadBlockIndex/GetCoinsCacheSizeStateMarcoFalke
fae8c28dae747f9c4c6481049742346d18202fc8 Pass mempool pointer to GetCoinsCacheSizeState (MarcoFalke) fac674db200e6b2d5b32069335fb24e713d7b69f Pass mempool pointer to UnloadBlockIndex (MarcoFalke) faec851b6eb7e65e28cdcae50d6dc86fafa0f91c test: Simplify cs_main locks (MarcoFalke) Pull request description: Split out from #19556 Instead of relying on the implicit mempool global, pass a mempool pointer (which can be `0`). This helps with testing, code clarity and unlocks the features described in #19556. ACKs for top commit: jnewbery: code review ACK fae8c28dae747f9c4c6481049742346d18202fc8 fjahr: Code review ACK fae8c28dae747f9c4c6481049742346d18202fc8 darosior: Tested ACK fae8c28dae747f9c4c6481049742346d18202fc8 jamesob: ACK fae8c28dae747f9c4c6481049742346d18202fc8 ([`jamesob/ackr/19604.1.MarcoFalke.pass_mempool_pointer_to`](https://github.com/jamesob/bitcoin/tree/ackr/19604.1.MarcoFalke.pass_mempool_pointer_to)) Tree-SHA512: fa687518c8cda4a095bdbdfe56e01fae2fb16c13d51efbb1312cd6dc007611fc47f53f475602e4a843e3973c9410e6af5a81d6847bd2399f8262ca7205975728
2020-07-29Pass mempool pointer to UnloadBlockIndexMarcoFalke
2020-07-29scripted-diff: Replace gArgs with local argsmanIvan Metlushko
-BEGIN VERIFY SCRIPT- sed -i -e 's/gArgs.Add/argsman.Add/g' `git grep -l "gArgs.Add"` -END VERIFY SCRIPT-
2020-07-29refactor: add unused ArgsManager to replace gArgsIvan Metlushko
2020-07-23Merge #15935: Add <datadir>/settings.json persistent settings storageMarcoFalke
9c69cfe4c54e38edd2f54303be2f8a53dcf5bad8 Add <datadir>/settings.json persistent settings storage. (Russell Yanofsky) eb682c5700e7a9176d0104d470b83ff9aa3589e8 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 9c69cfe4c54e38edd2f54303be2f8a53dcf5bad8 🌾 jnewbery: utACK 9c69cfe4c54e38edd2f54303be2f8a53dcf5bad8 Tree-SHA512: 39fcc6051717117c9141e934de1d0d3f739484be4685cdf97d54de967c8c816502b4fd0de12114433beaa5c5b7060c810fd8ae4e2b3ce7c371eb729ac01ba2e1
2020-07-23Merge #19334: wallet: Introduce WalletDatabase abstract classSamuel Dobson
d416ae560e46a4846a3fd5990b7d390d2ef30ec8 walletdb: Introduce WalletDatabase abstract class (Andrew Chow) 2179dbcbcd0b9bef7ad9c907b85294b9a1bccf0f walletdb: Add BerkeleyDatabase::Open dummy function (Andrew Chow) 71d28e7cdca1c8553531bb3a4725d7916363ec5c walletdb: Introduce AddRef and RemoveRef functions (Andrew Chow) 27b27663849932971eb5deadb1f19234b9cd97ea walletdb: Move BerkeleyDatabase::Flush(true) to Close() (Andrew Chow) Pull request description: A `WalletDatabase` abstract class is created from `BerkeleyDatabase` and is implemented by `BerkeleyDatabase`. First, to get to the point that this is possible, 4 functions need to be added to `BerkeleyDatabase`: `AddRef`, `RemoveRef`, `Open`, and `Close`. First the increment and decrement of `mapFileUseCount` is refactored into separate functions `AddRef` and `RemoveRef`. `Open` is introduced as a dummy function. This will raise an exception so that it always fails. `Close` is refactored from `Flush`. The `shutdown` argument in `Flush` is removed and instead `Flush(true)` is now the `Close` function. Split from #18971 Requires #19325 ACKs for top commit: ryanofsky: Code review ACK d416ae560e46a4846a3fd5990b7d390d2ef30ec8. Only changes since last review were rebasing after base PR #19334 merge, and adding cs_db lock in BerkeleyDatabase destructor, which should avoid races accessing env->m_databases and env->m_fileids fjahr: Code review ACK d416ae560e46a4846a3fd5990b7d390d2ef30ec8 meshcollider: Code review & test run ACK d416ae560e46a4846a3fd5990b7d390d2ef30ec8 Tree-SHA512: 98d05ec093d7446c4488e2b0914584222a331e9a2f4d5be6af98e3f6d78fdd8e75526c12f91a8a52d4820c25bce02aa02aabe92d38bee7eb2fce07d0691b7b0d
2020-07-16Merge bitcoin-core/gui#14: scripted-diff: rename movie folder to animationMarcoFalke
80968cff68f4d11d98a2a6670846eafbb2803f4f scripted-diff: rename movie folder to animation (Peter Bushnell) Pull request description: Rename the movies directory and RES_MOVIES make variable to animation and RES_ANIMATION respectively. Movies is a bit of an unexpected term to be found. ACKs for top commit: MarcoFalke: ACK 80968cff68f4d11d98a2a6670846eafbb2803f4f hebasto: ACK 80968cff68f4d11d98a2a6670846eafbb2803f4f, tested on Linux Mint 20 (Qt 5.12.8). Tree-SHA512: 6bd31ce36e821f6a1bef8a7972086a2387d6258c48fc9df12d3ffdae07d0237036afbc2dec673384b78d9567b91d6e12eafa59fa2305aa79153dfd9b7c3a8655
2020-07-15gui: Show permissions instead of whitelistedWladimir J. van der Laan
Show detailed permissions instead of legacy "whitelisted" flag. These are formatted with `&` in between just like services flags. It reuses the "N/A" translation message if not. This removes the one-but-last use of `legacyWhitelisted`.
2020-07-15Merge #19210: qt: Get rid of cursor in out-of-focus labelsWladimir J. van der Laan
bd315eb5e27d49d47759ae9417328427426cb269 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 bd315eb5e27d49d47759ae9417328427426cb269. laanwj: Tested ACK bd315eb5e27d49d47759ae9417328427426cb269 Tree-SHA512: 6bf89362412e5ce9a4dec6944b62fe44fc31ca49cda7f6e2eb37e847fac9dccb68bca7ac6877b19e42add2333e40d0b4265757ead105ac0a5d28f8ab43b322c3
2020-07-14walletdb: Introduce WalletDatabase abstract classAndrew Chow
Make WalletDatabase actually an abstract class and not just a typedef for BerkeleyDatabase. Have BerkeleyDatabase inherit this class.
2020-07-14gui, doc: rm Ban Score in GUI Peers window/release notes updatesJon Atack
2020-07-13test: Remove duplicate NodeContext hacksRussell Yanofsky
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-13Merge bitcoin-core/gui#30: Disable the main window toolbar when the modal ↵MarcoFalke
overlay is shown d0cc1f6df740e03ca0213a3754c3277b01ae2c05 qt: Disable toolbar when overlay is shown (Hennadii Stepanov) e74cd2083d579b14b0b718aa36796f2bcf679600 qt, refactor: Cleanup ModalOverlay slots (Hennadii Stepanov) Pull request description: Keeping the main window toolbar activated while the modal overlay is shown could create the appearance of the non-responsive GUI. Fixes #22. --- On master (ca055885c631de8ac0ffe24be6b02835dbcc039d): ![Screenshot from 2020-07-11 13-07-00](https://user-images.githubusercontent.com/32963518/87221791-7504e100-c377-11ea-9689-ddd4b21b98f9.png) With this PR: ![Screenshot from 2020-07-11 13-07-39](https://user-images.githubusercontent.com/32963518/87221803-8817b100-c377-11ea-92c8-3602dc4d2451.png) ACKs for top commit: harding: Tested ACK d0cc1f6df740e03ca0213a3754c3277b01ae2c05. Tested on Linux/X11 as much as I could given it's a pretty small change; seems like a nice improvement. I'm not experienced in Qt, but I don't see anything obviously problematic about the code. jonatack: ACK d0cc1f6 tested on Debian 5.7.6-1 (2020-06-24) x86_64 GNU/Linux LarryRuane: ACK d0cc1f6df740e03ca0213a3754c3277b01ae2c05 tested on Ubuntu 18.04.4 LTS Tree-SHA512: e371b34231c01e77118deb100e0f280ba1cdef54e317f7f7d6ac322598bda811bd1bfe3035e90d87f8267f4f5d2095d34a8136911159db63694fd1b1b11335a1
2020-07-11Merge #18923: wallet: Never schedule MaybeCompactWalletDB when -flushwallet ↵Samuel Dobson
is off fa73493930e35850e877725167dc9d42e47015c8 refactor: Use C++11 range-based for loop (MarcoFalke) fa7b164d62d9f12e9cda79bf28bf435acf2d1e38 wallet: Never schedule MaybeCompactWalletDB when -flushwallet is off (MarcoFalke) faf8401c195f52470d1ca6e2c94cb3820e57ee41 wallet: Pass unused args to StartWallets (MarcoFalke) fa6c186436337c8ed7d9e1ab065377f8cda5c0b7 gui tests: Limit life-time of dummy testing setup (MarcoFalke) fa28a618972911239a119248ab1194702a5c36d8 test: Add smoke test to check that wallets are flushed by default (MarcoFalke) Pull request description: User-facing, this is a refactor. Internally, the scheduler does not have to call a mostly empty function every half a second. ACKs for top commit: jnewbery: utACK fa73493930e35850e877725167dc9d42e47015c8 meshcollider: utACK fa73493930e35850e877725167dc9d42e47015c8 ryanofsky: Code review ACK fa73493930e35850e877725167dc9d42e47015c8. Just rebased since last review Tree-SHA512: 99e1fe1b2c22a3f4b19de3e566241d38693f4fd8d5a68ba1838d86740aa6c08e3325c11a072e30fd262a8861af4278bed52eb9374c85179b8f536477f528247c
2020-07-11qt: Disable toolbar when overlay is shownHennadii Stepanov
2020-07-11Add <datadir>/settings.json persistent settings storage.Russell Yanofsky
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-11qt, refactor: Cleanup ModalOverlay slotsHennadii Stepanov
2020-07-09Merge #19314: refactor: Use uint16_t instead of unsigned shortWladimir J. van der Laan
1cabbddbca615b26aa4510c75f459c28d6fe0afd refactor: Use uint16_t instead of unsigned short (Aaron Hook) Pull request description: I wanted to see if the `up for grabs` label works and looked at PR #17822 originally opend by ahook I saw it had many acks for example by jonatack and practicalswift but needed rebasing. So I checked out the remote branch rebased it resolved three conflicts and continued the rebase. Hope everything is as expected (: ACKs for top commit: sipsorcery: ACK 1cabbddbca615b26aa4510c75f459c28d6fe0afd. practicalswift: ACK 1cabbddbca615b26aa4510c75f459c28d6fe0afd -- patch looks correct :) laanwj: ACK 1cabbddbca615b26aa4510c75f459c28d6fe0afd hebasto: ACK 1cabbddbca615b26aa4510c75f459c28d6fe0afd, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 0e6bf64f274aae5dacb188358b4d5f65ccb207d4f70922f039bc4ed7934709418ddad19f8bfb7462517427837c3d2bb3f86ef284bb40e87119aad2a1e148d9d6
2020-07-09Merge #18993: qt: increase console command max lengthfanquake
fc6a637a013daeb14b2f93652d7f494f3b8462aa qt: increase console command max length (10xcryptodev) Pull request description: fix #17618 Tested the examples https://github.com/bitcoin/bitcoin/issues/17618#issuecomment-559538070 and works ACKs for top commit: MarcoFalke: Approach ACK fc6a637a013daeb14b2f93652d7f494f3b8462aa hebasto: ACK fc6a637a013daeb14b2f93652d7f494f3b8462aa, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 4975d7fa4c13a6b0f50f5754c3e04eb5a42b1411c385dc883d9948b6fc0dee38900ba2a418218a9a30ce39988a27d22f3ff3a02f0fa44f4136f01eef473efeca
2020-07-09Merge #18896: qt: Reset toolbar after all wallets are closedfanquake
1e9bfd4926a3cbb9db877c773a60b0bbbbe8bde0 qt: Reset toolbar after all wallets are closed (Hennadii Stepanov) Pull request description: If the last open wallet is closed from the non-"Overview" tab, that tab remains active when a new wallet is opened: ![Screenshot from 2020-05-06 09-00-26](https://user-images.githubusercontent.com/32963518/81142394-46821880-8f78-11ea-84b5-1d02f2b7f3f1.png) This PR fixes this bug. ACKs for top commit: promag: Code review ACK 1e9bfd4926a3cbb9db877c773a60b0bbbbe8bde0. luke-jr: utACK 1e9bfd4926a3cbb9db877c773a60b0bbbbe8bde0 jonasschnelli: utACK 1e9bfd4926a3cbb9db877c773a60b0bbbbe8bde0 Tree-SHA512: a8dfd7591267e9544ad40c87581d554e5cfaad4b2a5bbfdbaf2596dc6869d2ac6cf7877adfef3d528fc61b081d40c6e30d787bbd7280ef7946aa7f7d9bc8b18e
2020-07-09wallet: Pass unused args to StartWalletsMarcoFalke
This refactor does not change behavior
2020-07-09gui tests: Limit life-time of dummy testing setupMarcoFalke
Its only purpose is to create a directory. So instead of keeping it alive, use it only to get the path of the directory and then create it explicitly.
2020-07-03Clean up separated ban/discourage interfacePieter Wuille
2020-07-03qt: Get rid of cursor in out-of-focus labelsHennadii Stepanov
This change is a temporary fix of QTBUG-59514.
2020-07-01Merge bitcoin-core/gui#17: doc: Remove outdated comment in TransactionTablePrivMarcoFalke
faebb60b8d009e52d585cffd0f124a0f2fd1a66d doc: Remove outdated comment in TransactionTablePriv (MarcoFalke) Pull request description: Locks are no longer taken upfront, so remove the outdated comment ACKs for top commit: hebasto: ACK faebb60b8d009e52d585cffd0f124a0f2fd1a66d, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: cd6df24d49d17e58049ac9b261c5e07c8e85ed1aacb547b13c0e55139339d7fcc3b1f766ea2e27d758ea77deadc01f7e28781be1515323c82b9012cee8fd488b
2020-07-01Merge #19331: build: Do not include server symbols in walletWladimir J. van der Laan
faca73000fa8975c28f6be8be01957c1ae94ea62 ci: Install fixed version of clang-format for linters (MarcoFalke) fa4695da4c69646b58a8fa0b6b30146bb234deb8 build: Sort Makefile.am after renaming file (MarcoFalke) cccc2784a3bb10fa8e43be7e68207cafb12bd915 scripted-diff: Move ui_interface to the node lib (MarcoFalke) fa72ca6a9d90d66012765b0043fd819698b94ba8 qt: Remove unused includes (MarcoFalke) fac96e6450d595fe67168cb7afa7692da6cc9973 wallet: Do not include server symbols (MarcoFalke) fa0f6c58c1c6d10f04c4e65a424cc51ebca50a8c Revert "Fix link error with --enable-debug" (MarcoFalke) Pull request description: This reverts a hacky workaround from commit b83cc0f, which only happens to work due to compiler optimizations. Then, it actually fixes the linker error. The underlying problem is that the wallet includes symbols from the server (ui_interface), which usually results in linker failures. Though, in this specific case the linker failures have not been observed (unless `-O0`) because our compilers were smart enough to strip unused symbols. Fix the underlying problem by creating a new header-only with the needed symbol and move ui_interface to node to clarify that this is part of libbitcoin_server. ACKs for top commit: Sjors: ACK faca730 laanwj: ACK faca73000fa8975c28f6be8be01957c1ae94ea62 hebasto: re-ACK faca73000fa8975c28f6be8be01957c1ae94ea62, since the [previous](https://github.com/bitcoin/bitcoin/pull/19331#pullrequestreview-434420539) review: Tree-SHA512: e9731f249425aaea50b6db5fc7622e10078cf006721bb87989cac190a2ff224412f6f8a7dd83efd018835302337611f5839e29e15bef366047ed591cef58dfb4
2020-06-30doc: Remove outdated comment in TransactionTablePrivMarcoFalke
2020-06-29scripted-diff: rename movie folder to animationPeter Bushnell
-BEGIN VERIFY SCRIPT- sed -i -e 's/movies/animation/g' `git grep -l "movies"` sed -i -e 's/RES_MOVIES/RES_ANIMATION/g' `git grep -l "RES_MOVIES"` git mv src/qt/res/movies/ src/qt/res/animation -END VERIFY SCRIPT-
2020-06-27scripted-diff: Move ui_interface to the node libMarcoFalke
-BEGIN VERIFY SCRIPT- # Move files git mv src/ui_interface.h src/node/ui_interface.h git mv src/ui_interface.cpp src/node/ui_interface.cpp sed -i -e 's/BITCOIN_UI_INTERFACE_H/BITCOIN_NODE_UI_INTERFACE_H/g' src/node/ui_interface.h # Adjust includes and makefile sed -i -e 's|ui_interface|node/ui_interface|g' $(git grep -l ui_interface) # Sort includes git diff -U0 | clang-format-diff -p1 -i -v -END VERIFY SCRIPT-
2020-06-27qt: Remove unused includesMarcoFalke
2020-06-27Merge bitcoin-core/gui#6: Do not truncate node flag strings in debugwindow ↵MarcoFalke
peers details tab 0ac09c9793cd6d25ef6df14d74fb960529e1b4e3 qt: Do not truncate node flag strings in debugwindow.ui peers details tab. (saibato) Pull request description: Fix: When fiddling around with new node flags other than the usual. I saw that not all possible node flag strings i.e. the UNKNOWN[..] where visible in peers details tab. Since v18.2 fixed size was set to 300 and sliding is thereby limited. A fix on my old linux cruft and small screen was to set minimumSize width to -1 or 0. Qt will then autosize the slider to the max string length. Thereby i had full display of all flags inclusive sliding without to fullscreen the window. Not sure if this is even an issue for those who can afford big screens or high res macs? Feedback welcome. BTW: nice side effect now again easy to scroll trough long version names of the node. can't wait to see strings like /Satoshi:0.23.99/NOX2NOX4NOX32 or what ever fits in the version string. ACKs for top commit: hebasto: ACK 0ac09c9793cd6d25ef6df14d74fb960529e1b4e3, tested on Linux Mint 20 (x86_64, Qt 5.12.8). promag: Tested ACK 0ac09c9793cd6d25ef6df14d74fb960529e1b4e3 on macos. Tree-SHA512: a1601b5e35f10b1fd9407b28142ca00c1b985a822be5d23be4d7d3376211450f06e17f962c44b8b40977f8f8bbbb701cac1c5abb4afb3618da76385dfac848a3
2020-06-26Merge bitcoin-core/gui#8: Fix regression in TransactionTableModelMarcoFalke
d906aaa117e337fc70575beecc0d6da314f57385 qt: Fix regression in TransactionTableModel (Hennadii Stepanov) Pull request description: Since https://github.com/bitcoin/bitcoin/pull/17993 a crash is possible on exit. Steps to reproduce: - precondition: the old chain - start `bitcoin-qt` - wait until sync - on main window: Menu -> File -> Quit - crash This PR is based on ryanofsky's [suggestion](https://github.com/bitcoin-core/gui/issues/7#issuecomment-646639251). Fixes #7. ACKs for top commit: promag: Code review ACK d906aaa117e337fc70575beecc0d6da314f57385. ryanofsky: Code review ACK d906aaa117e337fc70575beecc0d6da314f57385. Only changes are squashing, adding assert and adding const vasild: ACK d906aaa1 Tree-SHA512: 99a475fd90dff50407a58537fdc6099a2a074018e9078452bf86defc1a4b9e546aa94f916d242355900b21638c6cfef845598a5282661a9343556c4514eb155f
2020-06-24qt: Remove needless headersHennadii Stepanov
2020-06-22qt: Fix regression in TransactionTableModelHennadii Stepanov
Since #17993 a crash is possible on exit. Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
2020-06-22refactor: Use uint16_t instead of unsigned shortAaron Hook
removed trailing whitespace to make linter happy
2020-06-22qt: Do not truncate node flag strings in debugwindow.ui peers details tab.saibato
Not all possible node flags are visible in details of peers tab since v18.2. qt will now autoadapt the slider to the full string size. Signed-off-by: saibato <saibato.naga@pm.me>
2020-06-21Merge #18027: "PSBT Operations" dialogSamuel Dobson
931dd4760855e036c176a23ec2de367c460e4243 Make lint-spelling.py happy (Glenn Willen) 11a0ffb29d1b4dcc55c8826873f340ab4196af21 [gui] Load PSBT from clipboard (Glenn Willen) a6cb0b0c29d327d01aebb98b0504f317eb19c3dc [gui] PSBT Operations Dialog (sign & broadcast) (Glenn Willen) 5dd0c03ffa3aeaa69d8a3a716f902f450d5eaaec FillPSBT: report number of inputs signed (or would sign) (Glenn Willen) 9e7b23b73387600d175aff8bd5e6624dd51f86e7 Improve TransactionErrorString messages. (Glenn Willen) Pull request description: Add a "PSBT Operations" dialog, reached from the "Load PSBT..." menu item, giving options to sign or broadcast the loaded PSBT as appropriate, as well as copying the result to the clipboard or saving it to a file. This is based on Sjors' #17509, and depends on that PR going in first. (It effectively replaces the small "load PSBT" dialog from that PR with a more feature-rich one.) Some notes: * The way I display status information is maybe unusual (a status bar, rather than messageboxes.) I think it's helpful to have the information in it be persistent rather than transitory. But if people dislike it, I would probably move the "current state of the transaction" info to the top line of the main label, and the "what action just happened, and did it succeed" info into a messagebox. * I don't really know much about the translation/localization stuff. I put tr() in all the places it seemed like it ought to go. I did not attempt to translate the result of TransactionErrorString (which is shared by GUI and non-GUI code); I don't know if that's correct, but it matches the "error messages in logs should be googleable in English" heuristic. I don't know whether there are things I should be doing to reduce translator effort (like minimizing the total number of distinct message strings I use, or something.) * I don't really know how (if?) automated testing is applied to GUI code. I can make a list of PSBTs exercising all the codepaths for manual testing, if that's the right approach. Input appreciated. ACKs for top commit: instagibbs: tested ACK https://github.com/bitcoin/bitcoin/pull/18027/commits/931dd4760855e036c176a23ec2de367c460e4243 Sjors: re-tACK 931dd4760855e036c176a23ec2de367c460e4243 jb55: ACK 931dd4760855e036c176a23ec2de367c460e4243 achow101: ACK 931dd4760855e036c176a23ec2de367c460e4243 Tree-SHA512: ade52471a2242f839a8bd6a1fd231443cc4b43bb9c1de3fb5ace7c5eb59eca99b1f2e9f17dfdb4b08d84d91f5fd65677db1433dd03eef51c7774963ef4e2e74f
2020-06-19Use explicit conversion from PKHash -> CKeyIDBen Woosley
These types are equivalent, in data etc, so they need only their data cast across. Note a function is used rather than a casting operator as CKeyID is defined at a lower level than script/standard
2020-06-19[gui] Load PSBT from clipboardGlenn Willen
2020-06-19[gui] PSBT Operations Dialog (sign & broadcast)Glenn Willen
Add a "PSBT Operations" dialog, reached from the "Load PSBT..." menu item, giving options to sign or broadcast the loaded PSBT as appropriate, as well as copying the result to the clipboard or saving it to a file.
2020-06-18FillPSBT: report number of inputs signed (or would sign)Glenn Willen
In FillPSBT, optionally report the number of inputs we successfully signed, as an out parameter. If "sign" is false, instead report the number of inputs for which GetSigningProvider does not return nullptr. (This is a potentially overbroad estimate of inputs we could sign.)
2020-06-18Merge #19310: wallet: BerkeleyDatabase make BerkeleyDatabase::Create, ↵MarcoFalke
CreateMock, and CreateDummy non-static functions da7a83c5ee6a51ff4c3eb35dbd447a310c4a0387 Remove WalletDatabase::Create, CreateMock, and CreateDummy (Andrew Chow) d6045d0ac615b5984b72e83cb25aa8a245a177a0 scripted-diff: Replace WalletDatabase::Create* with CreateWalletDatabase (Andrew Chow) 45c08f8a7b89dda6afb7d7cf9573a8ae8290ac92 Add Create*WalletDatabase functions (Andrew Chow) Pull request description: Instead of having `Create`, `CreateMock`, and `CreateDummy` being static functions in `BerkeleyDatabase`, move these to standalone functions in `walletdb.cpp`. This prepares us for having different `WalletDatabase` classes. Part of #18971. This was originally one commit but has been split into 3 to make it (hopefully) easier to review. ACKs for top commit: MarcoFalke: ACK da7a83c5ee6a51ff4c3eb35dbd447a310c4a0387 🎂 ryanofsky: Code review ACK da7a83c5ee6a51ff4c3eb35dbd447a310c4a0387. Easy review, nice scripted-diff Tree-SHA512: 1feb7cb3889168c555154bf3701a49095fd6b8cab911d44b7f7efbf6fcee2280ccb3d4afec8a83755b39a592ecd13b90a318faa655c321f87bdabdf1e2312327
2020-06-18scripted-diff: Make SeparatorStyle a scoped enumHennadii Stepanov
-BEGIN VERIFY SCRIPT- # General rename helper: $1 -> $2 rename_global() { sed -i "s/\<$1\>/$2/g" $(git grep -l "$1"); } # Helper to rename SeparatorStyle enumerators rename_value() { sed -i "s/ $1/ $2/g" src/qt/bitcoinunits.h; rename_global $1 "SeparatorStyle::$2"; } rename_global 'enum SeparatorStyle' 'enum class SeparatorStyle' rename_value 'separatorNever' 'NEVER' rename_value 'separatorStandard' 'STANDARD' rename_value 'separatorAlways' 'ALWAYS' -END VERIFY SCRIPT-
2020-06-17scripted-diff: Replace WalletDatabase::Create* with CreateWalletDatabaseAndrew Chow
-BEGIN VERIFY SCRIPT- sed -i -e 's/WalletDatabase::Create(/CreateWalletDatabase(/g' `git grep -l "WalletDatabase::Create("` sed -i -e 's/WalletDatabase::CreateDummy(/CreateDummyWalletDatabase(/g' `git grep -l "WalletDatabase::CreateDummy("` sed -i -e 's/WalletDatabase::CreateMock(/CreateMockWalletDatabase(/g' `git grep -l "WalletDatabase::CreateMock("` -END VERIFY SCRIPT-
2020-06-17Merge #19290: wallet: move BDB specific classes to bdb.{cpp/h}Samuel Dobson
61c16339da4e80b1320a6296df6d96cd7a84bb4e walletdb: Move BDB specific things into bdb.{cpp/h} (Andrew Chow) 8f033642a8c6874184e297b97b951b9bd12ffd75 walletdb: moveonly: Move BerkeleyBatch Cursor and Txn funcs to cpp (Andrew Chow) 25a655794a0c495332dadedd88b87d694c1077c2 walletdb: move IsWalletLoaded to walletdb.cpp (Andrew Chow) f6fc5f3849bac48dfccd015bec7089cb711d0667 walletdb: Add IsBDBWalletLoaded to look for BDB wallets specifically (Andrew Chow) c3538f435af8c408759d9d005e80b2f1690e0659 walletdb: Make SpliWalletFilePath non-static (Andrew Chow) Pull request description: Moves the BDB specific classes from db.{cpp/h} to bdb.{cpp/h}. To do this, `SplitWalletFilePath` is first made non-static. Then `IsWalletLoaded` functionality is moved to `IsBDBWalletLoaded` which is called by `IsWalletLoaded`. Then the bulk of db.{cpp/h} is moved to a new file bdb.{cpp/h}. While doing some moveonly stuff, an additional commit moves the `*Cursor` and `Txn*` implementations out of the header file and into the cpp file. Part of #18971 ACKs for top commit: laanwj: Code review ACK 61c16339da4e80b1320a6296df6d96cd7a84bb4e promag: Code review ACK 61c16339da4e80b1320a6296df6d96cd7a84bb4e. meshcollider: utACK 61c16339da4e80b1320a6296df6d96cd7a84bb4e Tree-SHA512: cb676cd34c9cd3c838a4fef230d84711efe4cf0d2eefa64ebfd7f787ddc6f7379db0b29454874ddc46ca7ffee0f18f6f3fb96a85513cd10164048948fd03a80c
2020-06-16Remove unused variablesMarcoFalke
2020-06-16Merge #18927: Pass bilingual_str argument to AbortNode()MarcoFalke
5527be06277647dffe7cda587c4bbfbec2a5c8ca refactor: Add AbortError alias (Hennadii Stepanov) d924f2a596c8f37deb2dd94069c578244823c31f Drop MSG_NOPREFIX flag (Hennadii Stepanov) 083daf7fbaf02de61f8d197ef6a8df98c1a57f7b Pass bilingual_str argument to AbortNode() (Hennadii Stepanov) d1cca129b4b5b8e4830e442ebaee55dd0660b48a 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 5527be06277647dffe7cda587c4bbfbec2a5c8ca 👟 Tree-SHA512: bf8b15b14912b1f672e6e588fffa1e6eb6f00b4b23d15d0ced7f18fbdf76919244427feb7217007fe29617049308e13def893a03a87358db819cca9692f59905
2020-06-15walletdb: Move BDB specific things into bdb.{cpp/h}Andrew Chow
Leave wallet/db.{cpp/h} for generic WalletDatabase stuff. The BDB specific stuff goes into bdb.{cpp/h}
2020-06-10Make GetWarnings() return bilingual_strHennadii Stepanov