aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-08-01Merge #16277: [Tests] Suppress output in test_bitcoin for expected errorsWladimir J. van der Laan
7a0c2242890549b6dddac4cc6f1840a528469f2a Suppress output in test_bitcoin for expected errors (Gert-Jaap Glasbergen) Pull request description: Closes #15944 This adds two methods to noui, that allows temporarily suppressing (and then resuming) the output from `noui`. For situations where errors are expected, it's confusing for the test binary to output an error and then conclude with `No errors detected`. It also uses this supress/reconnect in the tests that currently produce verbose errors when running `test_bitcoin`. Output of `test_bitcoin` on current master: ``` gertjaap@gjdesktop:~/src/bitcoin$ src/test/test_bitcoin Running 351 test cases... Error: Specified -walletdir "/tmp/test_common_Bitcoin Core/1561389554_943311758/tempdir/path_does_not_exist" does not exist Error: Specified -walletdir "/tmp/test_common_Bitcoin Core/1561389554_643733972/tempdir/not_a_directory.dat" is not a directory Error: Specified -walletdir "wallets" is a relative path *** No errors detected ``` Output after this code is merged: ``` gertjaap@gjdesktop:~/src/bitcoin$ src/test/test_bitcoin Running 351 test cases... *** No errors detected ``` ACKs for top commit: l2a5b1: ACK 7a0c224 - tested and reviewed. laanwj: ACK 7a0c2242890549b6dddac4cc6f1840a528469f2a Tree-SHA512: c7881f7a431a065329360ffa9937ce4742694c646c90c019d3aff95dfd7fccbdcda9116c5762feb6dfd1108d14f9fb386e203b173c4bde9093afb2b8c977d13d
2019-08-01Merge #16514: gui: Remove unused RPCConsole::tabFocusWladimir J. van der Laan
b078067b9c2aa1d259395198005fab470ea4e39d gui: Remove unused RPCConsole::tabFocus (João Barbosa) Pull request description: Added in #14573 but not used, so begone. ACKs for top commit: practicalswift: utACK b078067b9c2aa1d259395198005fab470ea4e39d hebasto: ACK b078067b9c2aa1d259395198005fab470ea4e39d laanwj: ACK b078067b9c2aa1d259395198005fab470ea4e39d, there's nothing really to test here Tree-SHA512: 237276dea4d174b5fca34855447146f79c3faaae7179f4245c70e2070b49282d95f886b1be6d2a33713c81a254f4483a4e4bf850053a8dcb18a3a897bd3da08e
2019-08-01Merge #16394: Allow createwallet to take empty passwords to make unencrypted ↵MeshCollider
wallets c5d37873677551caac34752214dd491f5278c8d5 Allow createwallet to take empty passwords to make unencrypted wallets (Andrew Chow) Pull request description: Allow createwallet to take the empty string as a password and interpret that as leaving the wallet unencrypted. Also warn when that happens. This fixes a bug where it was not possible to use the `avoid_reuse` option for new unencrypted wallets without using named arguments.Thus this allows more `createwallet` options to be added that can be set on unencrypted wallets when using positional arguments. ACKs for top commit: jnewbery: code review ACK c5d37873677551caac34752214dd491f5278c8d5 meshcollider: re-utACK c5d37873677551caac34752214dd491f5278c8d5 ryanofsky: utACK c5d37873677551caac34752214dd491f5278c8d5. Changes since last review are rebasing, concatenating warning strings to avoid discarding warnings, adding release notes, and choosing an unambiguous wallet name for the test. Tree-SHA512: 146737a728dd614ba94d4b166b27e8c9e195badd1709ccab2315afe59176d9b493dfba9b61c3ed81090f059c7e464d709deb06d99451b9a3fff667f527d6f7c9
2019-08-01Merge #16502: wallet: Drop unused OldKeyfanquake
0b1f4b3c6685d0a6307926d43d166add538061b7 wallet: Drop unused OldKey (João Barbosa) Pull request description: Replaces #16494, `OldKey` (previously `CWalletKey`) was never serialized in the code history which means that unserialization support is not required, so remove the code entirely. ACKs for top commit: jnewbery: ACK 0b1f4b3c6685d0a6307926d43d166add538061b7 laanwj: ACK 0b1f4b3c6685d0a6307926d43d166add538061b7 fanquake: ACK 0b1f4b3c6685d0a6307926d43d166add538061b7 Tree-SHA512: 92e9b2d6fc41f2765492d5d69d18fc4302c40ab44f28c8c30ca652c72767fbc484848c51a38ecf1f447849767a583c398784408bb5f64f9c86f9a5872b325ffc
2019-07-31gui: Remove unused RPCConsole::tabFocusJoão Barbosa
2019-07-31wallet: Drop unused OldKeyJoão Barbosa
2019-07-31Merge #16452: refactor: use RelayTransaction in BroadcastTransaction utilityMarcoFalke
9bc8b28c1d26c28edf4bbc890be97c0ad7a73cb9 refactor : use RelayTransaction in BroadcastTransaction utility (Antoine Riard) Pull request description: Implementing suggestion in https://github.com/bitcoin/bitcoin/pull/15713#discussion_r306571420. Seems a reason of these node utilities is to glue with already there functions, so we should reuse them. ACKs for top commit: MarcoFalke: ACK 9bc8b28c1d26c28edf4bbc890be97c0ad7a73cb9 promag: ACK 9bc8b28c1d26c28edf4bbc890be97c0ad7a73cb9, verified there are no more `PushInventory(CInv(MSG_TX, ...`, nice refactor, :+1: @amitiuttarwar. jnewbery: ACK 9bc8b28c1d26c28edf4bbc890be97c0ad7a73cb9 jonatack: ACK 9bc8b28c1d26c28edf4bbc890be97c0ad7a73cb9, second @jnewbery's suggestions, my guess is they could be added without risking delaying this PR. Tree-SHA512: 841c65d5f0d9ead5380814bb2260d7ebf03f2a9bfa58a1025785d353bdb42f9122cc257993e6a7bd2bd3f2c74db19c5978cc14be0d83258124ca22e33d6d0164
2019-07-31Merge #15906: [wallet] Move min_depth and max_depth to coin controlWladimir J. van der Laan
80ba4241a6773590f6b2c18dae758097b5adc02e extract min & max depth onto coin control (Amiti Uttarwar) Pull request description: - Refactor `AvailableCoins` to pull min & max depths from coin control. - Add `m_max_depth` to coin control to support this. - Addresses issue https://github.com/bitcoin/bitcoin/issues/15823, see thread for further details. ACKs for top commit: laanwj: ACK 80ba4241a6773590f6b2c18dae758097b5adc02e Tree-SHA512: 8f7c0aa90b3bc3667baf6741b1da2829f3919e1df92ae097d86c6b239f0c024eb410d7100e6251ea8fc49d022fb5a1214bf79b0f8b0014945b7784b2311647d1
2019-07-31Merge #16451: Remove CMerkleTxWladimir J. van der Laan
05b56d1c937b7667ad51400d2f9fb674af72953f [wallet] Remove CMerkleTx serialization logic (John Newbery) 783a76f23ba4f33b6e6f609eaf3bf41afd9bcd6f [wallet] Flatten CWalletTx class hierarchy (John Newbery) b3a9d179f23f654b8fba63924bbca5fd31ad4bb0 [wallet] Move CMerkleTx functions into CWalletTx (John Newbery) Pull request description: CMerkleTx is only used as a base class for CWalletTx. It was previously also used for vtxPrev which was removed in 93a18a3650292afbb441a47d1fa1b94aeb0164e3. This PR moves all of the CMerkleTx members and logic into CWalletTx. The CMerkleTx class is kept for deserialization and serialization of old wallet files. This makes the refactor in #15931 cleaner. ACKs for top commit: laanwj: ACK 05b56d1c937b7667ad51400d2f9fb674af72953f. Looks good to me. Tree-SHA512: 3d3a0069ebb536b12a328f1261e7dc55158a71088d445ae4b4ace4142c432dc296f58c8183b1922e54a60b8cc77e9d17c3dce7478294cd68693594baacf2bab3
2019-07-30Merge #16433: txmempool: Remove unused default value ↵Jonas Schnelli
MemPoolRemovalReason::UNKNOWN 0000ff0aa763e3be524ac4537a41048a26529fb2 txmempool: Remove unused default value MemPoolRemovalReason::UNKNOWN (MarcoFalke) Pull request description: The `remove*` methods set the removal reason to `UNKNOWN` by default. This is nowhere used; Except in tests, where the value doesn't matter. Fix that by removing the confusing default. ACKs for top commit: practicalswift: utACK 0000ff0aa763e3be524ac4537a41048a26529fb2 promag: ACK 0000ff0aa763e3be524ac4537a41048a26529fb2. jonasschnelli: utACK 0000ff0aa763e3be524ac4537a41048a26529fb2 Tree-SHA512: ffc8b35dd3291a81225171577c743c8bb2645638cab02960b6361174cb68afd739aaab7ab8661d65de5750d37daf16bb7eee9338958d8609093a8d46c2ada1ab
2019-07-30[wallet] Remove CMerkleTx serialization logicJohn Newbery
CMerkleTx is only used for deserialization of old wallet files. Remove the serialization logic, and tidy up CWalletTx serialization logic.
2019-07-30[wallet] Flatten CWalletTx class hierarchyJohn Newbery
Removes CMerkleTx as a base class for CWalletTx. Serialization logic is moved from CMerkleTx to CWalletTx.
2019-07-30[wallet] Move CMerkleTx functions into CWalletTxJohn Newbery
CMerkleTx only exists as a base class for CWalletTx and for wallet file serialization/deserialization. Move CMerkleTx methods into CWalletTx, but leave class hierarchy and serialization logic in place.
2019-07-30Merge #16434: build: Specify AM_CPPFLAGS for ZMQWladimir J. van der Laan
29ee4c417d97dca29c4ef53b6c1a55caa902787a Specify AM_CPPFLAGS for ZMQ. (Daniel Kraft) Pull request description: When building the ZMQ static library, add `AM_CPPFLAGS` to the library `CPPFLAGS`. Otherwise, we may miss important flags that are specified elsewhere. For instance, if `--enable-debug` is passed and `-DDEBUG_LOCKORDER` set, then that would not apply to the ZMQ library before (causing potential for hard-to-find bugs). ACKs for top commit: laanwj: utACK 29ee4c417d97dca29c4ef53b6c1a55caa902787a Tree-SHA512: 64085d71ed3f435a6e4df6dc42bda8b6159a4d292d0547c5b38c09d6ac95e976ad1728cd65278bffdd57363f60a58eb762b1171dafbe055cf94ffcd4f66da877
2019-07-30Add setting as known typePeter Bushnell
2019-07-30Merge #16475: wallet: Enumerate walletdb keysfanquake
fa6f22bf44c0f741285f27f27ac18e9679802e5e wallet: Rename CWalletKey to OldKey (MarcoFalke) fa6dc7fa5fdfd76c6dd5f7ae693a2fb4e37e271f wallet: Enumerate walletdb keys (MarcoFalke) Pull request description: It is nice to see all the keys that exists in a single enum Also, rename CWalletKey to OldKey and update the outdated documentation ACKs for top commit: laanwj: ACK fa6f22bf44c0f741285f27f27ac18e9679802e5e, I'm a big fan of this kind of change as it prevents typos, which can happen with 'magic' strings in the code. promag: ACK fa6f22bf44c0f741285f27f27ac18e9679802e5e. @jnewbery suggestions are great followups, I think this is good enough. meshcollider: utACK fa6f22bf44c0f741285f27f27ac18e9679802e5e achow101: Code review ACK fa6f22bf44c0f741285f27f27ac18e9679802e5e fanquake: ACK fa6f22bf44c0f741285f27f27ac18e9679802e5e - I had a quick look over, definitely prefer this to strings floating around everywhere. Tree-SHA512: 8ac3abd5a0d22dac1d77b8f97fe1e16c2608d650f3e9d6dd1df2fd5aeb35ef6643dfd4cd5c162404bb0100343c927d66df04dc695507ffc84a6c667e603acc54
2019-07-29Merge #16471: [mempool] log correct messages when CPFP failsWladimir J. van der Laan
42a5e912ee4e91a5191d659588f0605e1ada2f33 [mempool] log correct messages when CPFP fails (John Newbery) Pull request description: Fixes a logging issue introduced in #15681 ACKs for top commit: laanwj: ACK 42a5e912ee4e91a5191d659588f0605e1ada2f33 (+utACK from bluematt that isn't registered because it has no commit id) Tree-SHA512: ff5f423cc4d22838eea00c5b1d39ceda89cd61474c72f256a97c698eb0ec3f2156a97139f537669376132902c1e3943bf84c356a4b98a9a306b4ec57302c2761
2019-07-29Allow createwallet to take empty passwords to make unencrypted walletsAndrew Chow
Allow createwallet to take the empty string as a password and interpret that as leaving the wallet unencrypted. Also warn when that happens.
2019-07-29Merge #16436: gui: Do not create payment server if -disablewallet option ↵Wladimir J. van der Laan
provided 4057b7acb7125739537078d026ad96bb21708e3c wallet: Recognize -disablewallet option early (Hennadii Stepanov) Pull request description: This PR makes early check for the `-disablewallet` option. If `-disablewallet=1`, objects `PaymentServer` and `WalletController` are nor created. ACKs for top commit: jonasschnelli: utACK 4057b7acb7125739537078d026ad96bb21708e3c laanwj: ACK 4057b7acb7125739537078d026ad96bb21708e3c Tree-SHA512: 74633cd1eacd0914c73712e6dff190255b5378595cfee7eaeb91e17671fc9120928034739f4ae1c53b86f46c4b400390877241384376b2fc534de326d3ab0944
2019-07-29Merge #15993: net: Drop support of the insecure miniUPnPc versionsWladimir J. van der Laan
59cb722fd050393a69f1e0df97d857c893d19d80 Update configure to reject unsafe miniUPnPc API ver (Hennadii Stepanov) ab2190557ec2757fa48b52855b05561854af49af doc: Add release notes for 15993 (Hennadii Stepanov) 02709e95601c6020a87a6a05ee1d00c13fc38f9b Align formatting with clang-format (Hennadii Stepanov) 91a1b8508358d04685391651aea303ebce1c3d05 Use PACKAGE_NAME in UPnP description (Hennadii Stepanov) 9f76e45b9d6671e2074fb7a3885db703045a791f Drop support of insecure miniUPnPc versions (Hennadii Stepanov) Pull request description: 1. Minimum supported miniUPnPc API version is set to 10: - https://packages.ubuntu.com/xenial/libminiupnpc-dev - https://packages.debian.org/jessie/libminiupnpc-dev Refs: - #6583 - #6789 - #10414 2. The hardcoded "Bitcoin" replaced with `PACKAGE_NAME`: ![Screenshot from 2019-05-06 23-10-29](https://user-images.githubusercontent.com/32963518/57253178-afc60780-7056-11e9-83c9-e85670c58c1e.png) 3. Also style-only commit applied. Pardon: could not reopen my previous PR #15966. ACKs for top commit: ryanofsky: utACK 59cb722fd050393a69f1e0df97d857c893d19d80. Changes since last review: adding a new commit which updates configure script to fall back to disabling upnp if version is too old, adding a requested comment explaining static_assert condition, and fixing a spelling (jessy/jessie) Tree-SHA512: 42ed11bc2fb2ec83d5dd58e2383da5444a24fd572707f6cf10b622cb8943e28adfcca4750d06801024c4472625b5ea9279516fbd9d2ccebc9bbaafe1d148e80d
2019-07-29Merge #16399: wallet: Improve wallet creationMarcoFalke
e967cae8fac84ec7a89a3a853a83d8193ac3308e Use switch on status in RpcWallet (Fabian Jahr) ba1f128d6c117a63d5d904b3956551bd83405ec9 Return error for ignored passphrase through disable private keys option (Fabian Jahr) d6649d16b57e20b05075f1c80d0de7ff32cca1a4 Use strong enum for WalletCreationStatus (Fabian Jahr) 3199610ad3b93b849f2cb55a8ed3a39a32bbdffc Place out args at the end for CreateWallet (Fabian Jahr) Pull request description: This is a follow-up PR to #16244 The following suggestions are included: - Usage of `enum class` (https://github.com/bitcoin/bitcoin/pull/16244#discussion_r296434142) - Placing out args at the end convention (https://github.com/bitcoin/bitcoin/pull/16244#discussion_r296434172) - Return error when passphrase would be ignored because of disabled private keys (including functional test) (https://github.com/bitcoin/bitcoin/pull/16244#pullrequestreview-252015195) - Make `status` return variable of `CreateWallet` (https://github.com/bitcoin/bitcoin/pull/16244#discussion_r302107394) - Using a `switch` statement instead of `if/else` in `RpcWallet` (https://github.com/bitcoin/bitcoin/pull/16244#discussion_r302112502) Not included was: - "new create wallet function [could take] separate option arguments instead of wallet flags" (https://github.com/bitcoin/bitcoin/pull/16244#pullrequestreview-252015195) - "blank wallet and disable private keys options could be combined into a single option" (https://github.com/bitcoin/bitcoin/pull/16244#pullrequestreview-252015195) For these last two changes, I was not sure what an ideal solution could look like and/or this might be of slightly larger scope than the other changes, but I would be happy to work on these as well in this PR or another follow-up if I get positive feedback on that. Is there a place in the codebase that handles flags like these in a better way that I can refer to? Nonetheless, I would prefer keeping it in a separate PR unless it is a really simple change. ACKs for top commit: jnewbery: Code review utACK e967cae8fac84ec7a89a3a853a83d8193ac3308e MarcoFalke: ACK e967cae8fa Tree-SHA512: 3d12880ff95add9e4a5702afa26ef38080b57b216a608c113a4d0a08ba2d61142c027ba0071c6402add45db90383eee0bada12dc42820dc0d602721d7175edd5
2019-07-29Merge #16467: rpc: sendrawtransaction help privacy noteWladimir J. van der Laan
07e01d6258831fd2dfef959a405b3dfe4e88c3c1 rpc: sendrawtransaction unconditionality/privacy note (Jon Atack) Pull request description: In sendrawtransaction RPCHelpMan, mention unconditionality and privacy as per http://www.erisian.com.au/bitcoin-core-dev/log-2019-07-25.html#l-522 before ``` $ bitcoin-cli help sendrawtransaction sendrawtransaction "hexstring" ( maxfeerate ) Submits raw transaction (serialized, hex-encoded) to local node and network. Also see createrawtransaction and signrawtransactionwithkey calls. (...) ``` after ``` $ bitcoin-cli help sendrawtransaction sendrawtransaction "hexstring" ( maxfeerate ) Submit a raw transaction (serialized, hex-encoded) to local node and network. Note that the transaction will be sent unconditionally to all peers, so using this for manual rebroadcast may degrade privacy by leaking the transaction's origin, as nodes will normally not rebroadcast non-wallet transactions already in their mempool. Also see createrawtransaction and signrawtransactionwithkey calls. (...) ``` ACKs for top commit: promag: ACK 07e01d6258831fd2dfef959a405b3dfe4e88c3c1. laanwj: ACK 07e01d6258831fd2dfef959a405b3dfe4e88c3c1 Tree-SHA512: 427b3ca29384eef271eb496b7b14e883220863543a536ddeb31940aaffd52ea0b607d929d50f2b7958514105ef7823fa05c1ee381d4a432808753c06bd97af58
2019-07-28Trivial: add missing spaceDavid A. Harding
2019-07-27wallet: Rename CWalletKey to OldKeyMarcoFalke
2019-07-27wallet: Enumerate walletdb keysMarcoFalke
2019-07-27rpc: sendrawtransaction unconditionality/privacy noteJon Atack
In sendrawtransaction RPCHelpMan, mention unconditionality and privacy as per http://www.erisian.com.au/bitcoin-core-dev/log-2019-07-25.html#l-522 Thank you to MarcoFalke and laanwj for their review and suggestions.
2019-07-27Merge #15588: Log the actual wallet file version and no longer publicly ↵MeshCollider
expose the "version" record 35e60e790f2cd602d1bdd0be835d27f0ba37efa9 Remove ReadVersion and WriteVersion (Andrew Chow) b3d4f6c9619142948ab3d53551b4f3c0d7d73bde Log the actual wallet file version (Andrew Chow) c88e87c3b2be3f97b712107e04285d06dfef3878 Remove nFileVersion from CWalletScanState (Andrew Chow) Pull request description: The wallet file version is stored in the "minversion" record, not the "version" record. However "version" is no longer used anywhere except to record the highest versioned client which has opened a wallet file (which is currently only used to check whether this was most recently opened by a 0.4.0 or 0.5.0rc1 client which had a broken wallet encryption implementation). Furthermore, "version" was logged to the debug.log which is confusing because it is not the actual wallet file version. This PR changes it so that this confusion largely no longer exists. The wallet file version logging is changed to use "minversion" and reading and writing the "version" record is no longer publicly exposed to prevent potential confusion about whether the actual file version is being read or written. Lastly, in the one place it is actually used, the variable name is changed from nFileVersion to last_client to better reflect what that record actually represents. ACKs for top commit: jb55: ACK 35e60e7, I compiled locally as a quick sanity check. ryanofsky: utACK 35e60e790f2cd602d1bdd0be835d27f0ba37efa9. This code still pretty confusing, but a little simpler now. And the previous log statement was really misleading and useless compared to the new one here. meshcollider: Looks good, thanks! utACK 35e60e790f2cd602d1bdd0be835d27f0ba37efa9 Tree-SHA512: f782b2f215d07fbc9b806322bda8085445b81c02b65ca674a8c6a3e1de505a0abd050669afe0ead4778816144a1c18462e13930071cedb7227a058aeb39493f7
2019-07-27Merge #16415: Get rid of PendingWalletTx classMeshCollider
4d94916f0dda535cb69b538ee4e3fffb5b033c87 Get rid of PendingWalletTx class. (Russell Yanofsky) Pull request description: No reason for this class to exist if it doesn't have any code to run in the destructor. e10e1e8db043e9b7c113e07faf408f337c1b732d from https://github.com/bitcoin/bitcoin/pull/16208 recently removed the destructor code that would return an unused key if the transaction wasn't committed. This is just cleanup, there's no change in behavior. ACKs for top commit: ariard: utACK 4d94916. Successfully built both `bitcoind` and `bitcoin-qt`. `PendingWalletTx` was only a wrapper to enforce call to `ReturnDestination` if `CommitTransaction` doesn't `KeepDestination` before. promag: ACK 4d94916f0dda535cb69b538ee4e3fffb5b033c87, refactor looks good to me. meshcollider: utACK 4d94916f0dda535cb69b538ee4e3fffb5b033c87 Tree-SHA512: f3f93d2f2f5d8f1e7810d609d881c1b1cbbaa8629f483f4293e20b3210292605e947bc4903fde9d2d8736277ca3bd6de182f7eac1e13515d5a327f2ebc130839
2019-07-27Merge #16402: Remove wallet settings from chainparamsMeshCollider
fa4a605a4c611abe9af4c18aab20f4d1d039170f Remove wallet settings from chainparams (MarcoFalke) Pull request description: Feels a bit odd to have wallet setting in the chainparams, so remove them from there ACKs for top commit: promag: ACK fa4a605a4c611abe9af4c18aab20f4d1d039170f, missed s/2018/2019? practicalswift: utACK fa4a605a4c611abe9af4c18aab20f4d1d039170f darosior: ACK fa4a605a4c611abe9af4c18aab20f4d1d039170f Tree-SHA512: 2b3a5ee85d36af290d7db80bed1339e3c684607f1ce61cc65c906726e9174e40325fb1f67a34d8780f2a61fa39a1785e7c3a1cef5b6d6c364f38db5300cdbe3a
2019-07-27Merge #15996: rpc: Deprecate totalfee argument in `bumpfee`MeshCollider
2f7eb772f6250442d4a0071318047cb2deeb31fa Add RPC bumpfee totalFee deprecation test (Jon Atack) a92d9ce8cf355e18e43e1f207e4be9e42e7ec81a deprecate totalFee argument in bumpfee RPC call (Gregory Sanders) Pull request description: totalFee argument is of questionable use, and should be removed in favor of feerate-based features. I first moved IsDeprecatedRPCEnabled because `bitcoin-wallet` doesn't link `libbitcoin_server`. ACKs for top commit: ryanofsky: utACK 2f7eb772f6250442d4a0071318047cb2deeb31fa. Only change since last review is leaving IsDeprecatedRPCEnabled in its happy home, and switching to rpcEnableDeprecated instead. (Thanks!) jonatack: ACK 2f7eb772f6250442d4a0071318047cb2deeb31fa. Built locally, manually tested rpc bumpfee, help output ([gist](https://gist.github.com/jonatack/863673eacc02f9da39ff6d6712f9d837)), all tests pass. Travis failures appears to be unrelated, the [bitcoin builds are green](https://bitcoinbuilds.org/index.php?build=121). meshcollider: Code Review ACK 2f7eb772f6250442d4a0071318047cb2deeb31fa Tree-SHA512: c97465205ee59575df37894bcbb6c4ecf8858dd8fe9d89503f9342b226768c1dcb553153bc9eb3055f7bf5eb41573e48b8efa57e083cd255793cbe5280f0026a
2019-07-26[mempool] log correct messages when CPFP failsJohn Newbery
2019-07-26Merge #16301: Use CWallet::Import* functions in all import* RPCsMarcoFalke
40ad2f6a58228c72c655e3061a19a63640419378 Have importwallet use ImportPrivKeys and ImportScripts (Andrew Chow) 78941da5baf6244c7c54e86cf8ce3e09ce60c239 Optionally allow ImportScripts to set script creation timestamp (Andrew Chow) 94bf156f391759420465b2ff8c44f5f150246c7f Have importaddress use ImportScripts and ImportScriptPubKeys (Andrew Chow) a00d1e5ec5eb019f8bbeb060a2b09e341d360fe5 Have importpubkey use CWallet's ImportScriptPubKeys and ImportPubKeys functions (Andrew Chow) c6a827424711333f6f66cf5f9d79e0e6884769de Have importprivkey use CWallet's ImportPrivKeys, ImportScripts, and ImportScriptPubKeys (Andrew Chow) fae7a5befd0b8746d84a6fde575e5b4ea46cb3c4 Log when an import is being skipped because we already have it (Andrew Chow) ab28e31c9563bd2cd1e4a088ffd2479517dc83f2 Change ImportScriptPubKeys' internal to apply_label (Andrew Chow) Pull request description: #15741 introduced `ImportPrivKeys`, `ImportPubKeys`, `ImportScripts`, and `ImportScriptPubKeys` in `CWallet` which are used by `importmulti`. This PR changes the remaining `import*` RPCs (`importaddress`, `importprivkey`, `importpubkey`, and `importwallet`) to use these functions as well instead of directly adding the imported items to the wallet. ACKs for top commit: MarcoFalke: ACK 40ad2f6a58228c72c655e3061a19a63640419378 (checked that behavior changes are mentioned in the commit body) ryanofsky: utACK 40ad2f6a58228c72c655e3061a19a63640419378. Only change since last review is a tweaked commit message (mentioning label update in importpubkey commit) Sjors: ACK 40ad2f6a5. Those extra tests also pass. Tree-SHA512: 910e3bbe20b6f8809a47b7293775db234125615d886c7fd99c194f4cdf00c765eb1e24b1799260f1213b98c88f9bbe696796f36087c182925e567d44e9194c98
2019-07-26deprecate totalFee argument in bumpfee RPC callGregory Sanders
2019-07-25Merge #15305: [validation] Crash if disconnecting a block failsfanquake
a47df13471e3168e2e02023fb20cdf2414141b36 [qa] Test disconnect block failure -> shutdown (Suhas Daftuar) 4433ed0f730cfd60eeba3694ff3c283ce2c0c8ee [validation] Crash if disconnecting a block fails (Suhas Daftuar) Pull request description: If we're unable to disconnect a block during normal operation, then that is a failure of our local system (such as disk failure) or the chain that we are on (eg CVE-2018-17144), but cannot be due to failure of the (more work) chain that we're trying to validate. We should abort rather than stay on a less work chain. Fixes #14341. ACKs for top commit: practicalswift: utACK a47df13471e3168e2e02023fb20cdf2414141b36 TheBlueMatt: utACK a47df13471e3168e2e02023fb20cdf2414141b36. Didn't bother to review the test in detail, it looked fine. Debated whether invalidateblock should ever crash the node, but *not* crashing in the case of hitting a pruned block (which is the only change here) is clearly better, even if there are other cases I'd argue we should crash in. ryanofsky: utACK a47df13471e3168e2e02023fb20cdf2414141b36. Only change since last review is new comment. promag: ACK a47df1347, it takes awhile to quit (RPC connection timeouts) but that's unrelated - hope to fix that soon. fanquake: ACK a47df13471e3168e2e02023fb20cdf2414141b36 Tree-SHA512: 4dec8cef6e7dbbe513c138fc5821a7ceab855e603ece3c16185b51a3830ab7ebbc844a28827bf64e75326f45325991dcb672f13bd7baede53304f27289c4af8d
2019-07-24refactor : use RelayTransaction in BroadcastTransaction utilityAntoine Riard
To do so, we also refactor RelayTransaction to take a txid instead of passing a tx
2019-07-24Have importwallet use ImportPrivKeys and ImportScriptsAndrew Chow
Behavior changes: * An "Importing ..." line is logged for every key, even ones that are skipped
2019-07-24Optionally allow ImportScripts to set script creation timestampAndrew Chow
Behavior changes: * scripts imported in importmulti that are not explicilty scriptPubKeys will have timestamps set for them
2019-07-24Have importaddress use ImportScripts and ImportScriptPubKeysAndrew Chow
Also removes the now unused ImportAddress and ImportScript from rpcdump.cpp Behavior changes: * No errors will be thrown when the script or key already exists in the wallet. * If the key or script is already in the wallet, their labels will be updated.
2019-07-24Have importpubkey use CWallet's ImportScriptPubKeys and ImportPubKeys functionsAndrew Chow
Behavior changes: * If any scripts for the pubkey were already in the wallet, their timestamps will be set to 1 and label updated
2019-07-24scripted-diff: Make translation bilingualHennadii Stepanov
-BEGIN VERIFY SCRIPT- sed -i 's/inline std::string _(const char\* psz)/inline bilingual_str _(const char\* psz)/' src/util/translation.h sed -i 's/return G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz;/return bilingual_str{psz, G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz};/' src/util/translation.h sed -i 's/\b_("\([^"]\|\\"\)*")/&.translated/g' $(git grep --files-with-matches '\b_("' src) echo Hard cases - multiline strings. sed -i 's/"Visit %s for further information about the software.")/&.translated/g' src/init.cpp sed -i "s/\"Only rebuild the block database if you are sure that your computer's date and time are correct\")/&.translated/g" src/init.cpp sed -i 's/" restore from a backup.")/&.translated/g' src/wallet/db.cpp sed -i 's/" or address book entries might be missing or incorrect.")/&.translated/g' src/wallet/wallet.cpp echo Special case. sed -i 's/_(COPYRIGHT_HOLDERS)/&.translated/' src/util/system.cpp test/lint/lint-format-strings.py -END VERIFY SCRIPT-
2019-07-24Add bilingual message typeHennadii Stepanov
2019-07-24Refactor out translation.hHennadii Stepanov
This is a prerequisite for introducing bilingual error messages. Note: #includes are arranged by clang-format-diff.py script.
2019-07-23Merge #16366: init: Use InitError for all errors in bitcoind/qtMarcoFalke
fa6f402bde146f92ed131e0c9c8e15a55e723307 Call node->initError instead of InitError from GUI code (Russell Yanofsky) fad2502240a1c440ef03ac3f880475702e418275 init: Use InitError for all errors in bitcoind/qt (MarcoFalke) Pull request description: Using the same InitError for startup error in the daemon and the gui makes it possible to run the tests with the gui again: ```sh BITCOIND=bitcoin-qt ./test/functional/test_runner.py feature_includeconf feature_config_args ACKs for top commit: hebasto: ACK fa6f402bde146f92ed131e0c9c8e15a55e723307 ryanofsky: utACK fa6f402bde146f92ed131e0c9c8e15a55e723307. Only changes since last review are removing more includes and adding Node::initError method to avoid accessing node `InitError` function and global variables from GUI code. Tree-SHA512: bd19e08dcea4019dfe40356bc5c63cb583cefed54b6c9dcfb82f1b5b00308d8e2b363549afcaea5e93bf83864dbe0917400c3b70f43a8a5bdff45c9cd34cc294
2019-07-23wallet: Recognize -disablewallet option earlyHennadii Stepanov
2019-07-23Merge #16355: refactor: move CCoinsViewErrorCatcher out of init.cppfanquake
4f050b91c706181084b9288b8a87b7b637e4e4f7 move-onlyish: move CCoinsViewErrorCatcher out of init.cpp (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11): Parent PR: #15606 Issue: #15605 Specification: https://github.com/jamesob/assumeutxo-docs/tree/2019-04-proposal/proposal --- This change moves `CCoinsViewErrorCatcher` out of `init` and into `coins` so that it can later be included in [a `CoinsView` instance](https://github.com/bitcoin/bitcoin/pull/15606/commits/91284964ef34b90ee6c626137973d2c15e7b25da#diff-349fbb003d5ae550a2e8fa658e475880R504) under `CChainState`. Instead of hardcoding read failure behavior that has knowledge of qt, it accepts error callbacks via `AddReadErrCallback()`. ACKs for top commit: dongcarl: re-ACK 4f050b91c706181084b9288b8a87b7b637e4e4f7 ryanofsky: utACK 4f050b91c706181084b9288b8a87b7b637e4e4f7. Only change since last review is fixing const. Tree-SHA512: eaba21606d15d2b8d0e3db7cec57779ce181af953db1ef4af80a0bc1dfb57923d0befde9d61b7be55c32224744f7fb6bd47d4e4c72f3ccfe6eaf0f4ae3765c17
2019-07-22extract min & max depth onto coin controlAmiti Uttarwar
2019-07-22Remove ReadVersion and WriteVersionAndrew Chow
The "version" record that these functions read and write are not used anywhere in the code except for one place. There is no reason to expose these functions publicly. Furthermore, this avoids potential confusion as developers may mistake these functions for actually reading and writing the wallet version when they do not.
2019-07-22Log the actual wallet file versionAndrew Chow
The actual wallet file version is the minversion record, not the version record.
2019-07-22Remove nFileVersion from CWalletScanStateAndrew Chow
nFileVersion is not the actual file version and is not used except in one place. So it is removed from CWalletScanState and changed so that it is just read at the place it is needed. Furthermore, the "version" record now only indicates the version of the highest versioned client that has opened a wallet file so the variable name is changed accordingly
2019-07-22Specify AM_CPPFLAGS for ZMQ.Daniel Kraft
When building the ZMQ static library, add AM_CPPFLAGS to the library CPPFLAGS. Otherwise, we may miss important flags that are specified elsewhere. For instance, if --enable-debug is passed and -DDEBUG_LOCKORDER set, then that would not apply to the ZMQ library before (causing potential for hard-to-find bugs).