Commit graph

20915 commits

Author SHA1 Message Date
fanquake 25f0edd59f
Merge #16448: doc: add note on precedence of options in bitcoin.conf
fa2f991fa2 doc: add note on precedence of options in bitcoin.conf (Torkel Rogstad)

Pull request description:

  This was a good addition to the docs, but the PR was closed. So I've cherry-picked the commit and fixed up Russ's comments as well as the linter issue.

ACKs for top commit:
  laanwj:
    ACK fa2f991fa2
  hebasto:
    ACK fa2f991fa2, I have reviewed the code and it looks OK, I agree it can be merged.
  jamesob:
    ACK fa2f991fa2
  jonatack:
    ACK fa2f991fa2
  ryanofsky:
    ACK fa2f991fa2. Only suggested changes since previous review.

Tree-SHA512: d8e7bac19e85ad32205652c3c3036766c611cae52e6e3e8af66a2da054659d914dc153d0cf4ace9c0fa7b41f2a8d74d0edd8d83fe7e984b93d70c01a388cf8ec
2019-08-01 07:54:46 +08:00
MarcoFalke 5639d71a07
Merge #16293: test: Make test cases separate functions
faf8318c55 test: Split fundrawtx test into subtests (MarcoFalke)
fa6fba3bc8 test: Make local symbols in run_test members (MarcoFalke)

Pull request description:

  This prevents scope-leak of symbols that are supposed to be local to one test case.

Top commit has no ACKs.

Tree-SHA512: 9b2a4ca2cdd631ef915d2f7e6cd62375df9a0919448350aa6e5ae4aa8a8fe3ba53870f7a9a25a57736894b4e3a45e861018253ed2d57d9a64c2bb65fa270fad8
2019-07-31 18:03:53 -04:00
MarcoFalke 7821821a23
Merge #16452: refactor: use RelayTransaction in BroadcastTransaction utility
9bc8b28c1d 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 9bc8b28c1d
  promag:
    ACK 9bc8b28c1d, verified there are no more `PushInventory(CInv(MSG_TX, ...`, nice refactor, 👍 @amitiuttarwar.
  jnewbery:
    ACK 9bc8b28c1d
  jonatack:
    ACK 9bc8b28c1d, second @jnewbery's suggestions, my guess is they could be added without risking delaying this PR.

Tree-SHA512: 841c65d5f0d9ead5380814bb2260d7ebf03f2a9bfa58a1025785d353bdb42f9122cc257993e6a7bd2bd3f2c74db19c5978cc14be0d83258124ca22e33d6d0164
2019-07-31 10:49:28 -04:00
MarcoFalke 3f288a1c05
Merge #16504: doc: Add release note for the deprecated totalFee option of bumpfee
73b692b531 doc: Add release note for the deprecated totalFee option of bumpfee (João Barbosa)

Pull request description:

  Adds release notes for #15996.

Top commit has no ACKs.

Tree-SHA512: 2d75c2fbdd122aa02e808013dd3424843495038bac289b64acc6cc9889bb8ee30d6a91ec2a1b61e6949b1b6e4437331388588d804c81a83757d35d07bf579bc3
2019-07-31 07:36:31 -04:00
João Barbosa 73b692b531 doc: Add release note for the deprecated totalFee option of bumpfee 2019-07-31 12:32:55 +01:00
MarcoFalke f89113626e
Merge #16505: Changes verbosity of msbuild from quiet to normal in the appveyor script
0646ca5ea2 Changes the verbosity of msbuild from quiet to normal in the appveyor script. Increasing the verbosity helps to identify the cause of build errors which is the main purpose of the appveyor script. (Aaron Clauson)

Pull request description:

  Increasing the verbosity helps to identify the cause of build errors which is the main purpose of the appveyor script.

  Partially in response to #16487 where the msbuild error is difficult to determine due to the `quiet` logging level.

ACKs for top commit:
  practicalswift:
    utACK 0646ca5ea2
  MarcoFalke:
    ACK 0646ca5ea2. Previously I had to ping sipsorcery every time an issue appeared, now I might be able to look it up myself.

Tree-SHA512: 28d505e3d370523058d6b55ac72fdafd89b451fdc3295e19500dc10a1d868487c62907d86befd0723f263d258a2917ad940b0350cb8e2e0a77799c8c7aa17ec6
2019-07-31 07:24:20 -04:00
Wladimir J. van der Laan 00922b8720
Merge #15906: [wallet] Move min_depth and max_depth to coin control
80ba4241a6 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 80ba4241a6

Tree-SHA512: 8f7c0aa90b3bc3667baf6741b1da2829f3919e1df92ae097d86c6b239f0c024eb410d7100e6251ea8fc49d022fb5a1214bf79b0f8b0014945b7784b2311647d1
2019-07-31 12:11:51 +02:00
Aaron Clauson 0646ca5ea2
Changes the verbosity of msbuild from quiet to normal in the appveyor script. Increasing the verbosity helps to identify the cause of build errors which is the main purpose of the appveyor script. 2019-07-31 10:00:02 +02:00
Wladimir J. van der Laan 8241b51504
Merge #16451: Remove CMerkleTx
05b56d1c93 [wallet] Remove CMerkleTx serialization logic (John Newbery)
783a76f23b [wallet] Flatten CWalletTx class hierarchy (John Newbery)
b3a9d179f2 [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 93a18a3650.

  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 05b56d1c93. Looks good to me.

Tree-SHA512: 3d3a0069ebb536b12a328f1261e7dc55158a71088d445ae4b4ace4142c432dc296f58c8183b1922e54a60b8cc77e9d17c3dce7478294cd68693594baacf2bab3
2019-07-31 09:00:55 +02:00
Jonas Schnelli 39763b7555
Merge #16433: txmempool: Remove unused default value MemPoolRemovalReason::UNKNOWN
0000ff0aa7 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 0000ff0aa7
  promag:
    ACK 0000ff0aa7.
  jonasschnelli:
    utACK 0000ff0aa7

Tree-SHA512: ffc8b35dd3291a81225171577c743c8bb2645638cab02960b6361174cb68afd739aaab7ab8661d65de5750d37daf16bb7eee9338958d8609093a8d46c2ada1ab
2019-07-30 22:02:02 +02:00
John Newbery 05b56d1c93 [wallet] Remove CMerkleTx serialization logic
CMerkleTx is only used for deserialization of old wallet files. Remove
the serialization logic, and tidy up CWalletTx serialization logic.
2019-07-30 11:57:06 -04:00
John Newbery 783a76f23b [wallet] Flatten CWalletTx class hierarchy
Removes CMerkleTx as a base class for CWalletTx. Serialization logic is
moved from CMerkleTx to CWalletTx.
2019-07-30 11:57:06 -04:00
John Newbery b3a9d179f2 [wallet] Move CMerkleTx functions into CWalletTx
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-30 11:57:06 -04:00
Wladimir J. van der Laan 74f1a27f2f
Merge #15134: tests: Switch one of the Travis jobs to an unsigned char environment (-funsigned-char)
0c78e49be3 tests: Switch one of the Travis jobs to an unsigned char environment (-funsigned-char) (practicalswift)

Pull request description:

  Switch one of the Travis jobs to an unsigned char environment (`-funsigned-char`).

  This will help us catch errors due to code written under the assumption that `char` has the same value range as `signed char`.

  The signedness of `char` is implementation-defined.

  Example:

  ```
  $ uname -a
  Linux […] x86_64 x86_64 x86_64 GNU/Linux
  $ cat foo.cpp
  #include <iostream>

  int main() {
      char c;
      std::cin >> c;
      int i = (unsigned char)c;
      std::cout << i << "\n";
  }
  $ clang++ -o foo foo.cpp
  $ echo -e "\xff" | ./foo
  255
  $ clang++ -fsigned-char -o foo foo.cpp
  $ echo -e "\xff" | ./foo
  255
  $ clang++ -funsigned-char -o foo foo.cpp
  $ echo -e "\xff" | ./foo
  255
  $ cat bar.cpp
  #include <iostream>

  int main() {
      char c;
      std::cin >> c;
      int i = c;
      std::cout << i << "\n";
  }
  $ clang++ -o bar bar.cpp
  $ echo -e "\xff" | ./bar
  -1
  $ clang++ -fsigned-char -o bar bar.cpp
  $ echo -e "\xff" | ./bar
  -1
  $ clang++ -funsigned-char -o bar bar.cpp
  $ echo -e "\xff" | ./bar
  255
  ```

  `gcc` chars:
  * signed: alpha, hppa, ia64, m68k, mips, sh, sparc, x86
  * unsigned: arm, powerpc, s390

  About `-funsigned-char`:

  > Let the type "char" be unsigned, like "unsigned char".
  >
  > Each kind of machine has a default for what "char" should be.  It is either like "unsigned char" by default or like "signed char" by default.
  >
  > Ideally, a portable program should always use "signed char" or "unsigned char" when it depends on the signedness of an object.  But many programs have been written to use plain "char" and expect it to be signed, or expect it to be unsigned, depending on the machines they were written for.
  >
  > This option, and its inverse, let you make such a program work with the opposite default. The type "char" is always a distinct type from each of "signed char" or "unsigned char", even though its behavior is always just like one of those two.

ACKs for top commit:
  laanwj:
    ACK 0c78e49be3

Tree-SHA512: ba04590415c0bb9a0bbd348623e57068f75274f53da7247d5c5ecad82e365a5b45893a4a491d318e82a8feb6a25f019d46e01990afb33162e2c9740d33a343d7
2019-07-30 16:58:24 +02:00
Wladimir J. van der Laan bd35ec36f5
Merge #16434: build: Specify AM_CPPFLAGS for ZMQ
29ee4c417d 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 29ee4c417d

Tree-SHA512: 64085d71ed3f435a6e4df6dc42bda8b6159a4d292d0547c5b38c09d6ac95e976ad1728cd65278bffdd57363f60a58eb762b1171dafbe055cf94ffcd4f66da877
2019-07-30 15:42:05 +02:00
fanquake 53b5a4f7ec
Merge #16483: doc: update Python command in msvc readme
e0324c3768 Updated python command in readme so it will work on systems that have both python2 and 3 installed. (Aaron Clauson)

Pull request description:

  Trivial doc update to the msvc build readme. It updates the python command to use the `py` python launcher so that it will work where Python2 & 3 are installed and 2 is the default (the msvc generator script is incompatible with Python 2).

Top commit has no ACKs.

Tree-SHA512: d7028d1ce4f3132e6b03a02f07ab2464eb946b603e0d46ef5c64882f3a99283602cf61f60e0c3a9c2836767b03222c8f37a9e7bfafda329cf7083f79235b2c65
2019-07-30 16:35:26 +08:00
MeshCollider ff57fb4578
Merge #15709: wallet: Do not add "setting" key as unknown
914923d125 Add setting as known type (Peter Bushnell)

Pull request description:

  When loading old wallets I get "Unknown wallet records" showing up in the log file. The key that is adding to the unknown record count is "setting", this is a known key removed in the 0.6 release of Bitcoin in the commit linked below. The "setting" key is not known to the wallet anymore, like "acentry" which is not added as an unknown record, but the "setting" key was used in previous versions of Bitcoin.

  972060ce0e (diff-8094838580e1bb7a3bb8fc78dcebc733)

ACKs for top commit:
  laanwj:
    ACK 914923d125, this code change is straightforward enough and I don't think it makes sense to warn about this key being present.
  meshcollider:
    ACK 914923d125

Tree-SHA512: 6346690c05cebae2dcd868512322bf5250f6fbd07abb5e747065444185d3f69e19e1a99e3f38d6e34535ffd6979b2297100ba9c7da8e45ca792598eded5ae0d3
2019-07-30 20:31:32 +12:00
Peter Bushnell 914923d125 Add setting as known type 2019-07-30 06:36:34 +01:00
fanquake 33894612c0
Merge #16484: doc: update labels in CONTRIBUTING.md
faa88d0b5c doc: update labels in CONTRIBUTING.md (MarcoFalke)

Pull request description:

  None of the examples in the "trivial" area are acceptable pull requests, unless they are acceptable in a different area (like "doc" or "log").

  Fix that by removing the "trivial" area.

ACKs for top commit:
  jonatack:
    ACK faa88d0b5c
  fanquake:
    ACK faa88d0b5c - agree that trivial was pretty useless and that the meaning was unclear. Other changes look fine. Surprised the white space linter hasn't been having a field day in this file.

Tree-SHA512: 6208bcc7c84ad0ca6aeaa2de1901c9da8971aac332b5e7a1194ea7b24fb2d887f988aa22fdfa818e89cbcfd8cb8595ce312525f88c81c5ade484fd7c9bd13d1b
2019-07-30 11:50:37 +08:00
fanquake 478fe328a7
Merge #16475: wallet: Enumerate walletdb keys
fa6f22bf44 wallet: Rename CWalletKey to OldKey (MarcoFalke)
fa6dc7fa5f 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 fa6f22bf44, 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 fa6f22bf44. @jnewbery suggestions are great followups, I think this is good enough.
  meshcollider:
    utACK fa6f22bf44
  achow101:
    Code review ACK fa6f22bf44
  fanquake:
    ACK fa6f22bf44 - I had a quick look over, definitely prefer this to strings floating around everywhere.

Tree-SHA512: 8ac3abd5a0d22dac1d77b8f97fe1e16c2608d650f3e9d6dd1df2fd5aeb35ef6643dfd4cd5c162404bb0100343c927d66df04dc695507ffc84a6c667e603acc54
2019-07-30 11:37:01 +08:00
fanquake 2410088003
Merge #16491: qa: fix deprecated log.warn in feature_dbcrash test
62d3f5057f qa: fix deprecated log.warn in feature_dbcrash test (Jon Atack)

Pull request description:

  This clears up the following deprecation message when running test/functional/feature_dbcrash.py:
  ```
  test/functional/feature_dbcrash.py:270:
  DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
    self.log.warn("Node %d never crashed during utxo flush!", i)
  ```

  Git grepping indicates that this was the last remaining use of `log.warn` in the functional tests.

ACKs for top commit:
  fanquake:
    ACK 62d3f5057f - checked that there were no more occurrences.

Tree-SHA512: 2fe87400f82488e44391f4897876003a98736013e819a7dbc3b3e87a5ffbfba8d5ccab81cf2b7577f40135c95e4db96e93bb8cb24de396efb4ad814fbda09559
2019-07-30 11:16:46 +08:00
Jon Atack 62d3f5057f
qa: fix deprecated log.warn in feature_dbcrash test
This clears up the following deprecation message when running the test:
```
test/functional/feature_dbcrash.py:270: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
  self.log.warn("Node %d never crashed during utxo flush!", i)
```

Git grepping indicates that this was the last remaining use of `log.warn` in the functional tests.
2019-07-29 23:23:18 +02:00
MarcoFalke faa88d0b5c
doc: update labels in CONTRIBUTING.md 2019-07-29 13:17:05 -04:00
Wladimir J. van der Laan 68da54987d
Merge #16471: [mempool] log correct messages when CPFP fails
42a5e912ee [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 42a5e912ee (+utACK from bluematt that isn't registered because it has no commit id)

Tree-SHA512: ff5f423cc4d22838eea00c5b1d39ceda89cd61474c72f256a97c698eb0ec3f2156a97139f537669376132902c1e3943bf84c356a4b98a9a306b4ec57302c2761
2019-07-29 18:55:17 +02:00
Wladimir J. van der Laan 2a7c3bc498
Merge #16436: gui: Do not create payment server if -disablewallet option provided
4057b7acb7 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 4057b7acb7
  laanwj:
    ACK 4057b7acb7

Tree-SHA512: 74633cd1eacd0914c73712e6dff190255b5378595cfee7eaeb91e17671fc9120928034739f4ae1c53b86f46c4b400390877241384376b2fc534de326d3ab0944
2019-07-29 17:18:55 +02:00
Wladimir J. van der Laan b21acab82f
Merge #15993: net: Drop support of the insecure miniUPnPc versions
59cb722fd0 Update configure to reject unsafe miniUPnPc API ver (Hennadii Stepanov)
ab2190557e doc: Add release notes for 15993 (Hennadii Stepanov)
02709e9560 Align formatting with clang-format (Hennadii Stepanov)
91a1b85083 Use PACKAGE_NAME in UPnP description (Hennadii Stepanov)
9f76e45b9d 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 59cb722fd0. 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-29 16:51:36 +02:00
MarcoFalke 74ea1f3b0f
Merge #16399: wallet: Improve wallet creation
e967cae8fa Use switch on status in RpcWallet (Fabian Jahr)
ba1f128d6c Return error for ignored passphrase through disable private keys option (Fabian Jahr)
d6649d16b5 Use strong enum for WalletCreationStatus (Fabian Jahr)
3199610ad3 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 e967cae8fa
  MarcoFalke:
    ACK e967cae8fa

Tree-SHA512: 3d12880ff95add9e4a5702afa26ef38080b57b216a608c113a4d0a08ba2d61142c027ba0071c6402add45db90383eee0bada12dc42820dc0d602721d7175edd5
2019-07-29 09:36:55 -04:00
Wladimir J. van der Laan 29220250c1
Merge #16441: build: remove qt libjpeg check from bitcoin_qt.m4
f509e3b8ce doc: remove line numbers from qt package links (fanquake)
1bb1661a40 doc: fix typo in bitcoin_qt.m4 comment (fanquake)
0aeb98ac1f build: remove jpeg lib check from bitcoin_qt.m4 (fanquake)
98a64bd296 build: disable libjpeg in qt (fanquake)

Pull request description:

  When gitian building on Windows I'm seeing:
  ```bash
  checking for Qt 5... yes
  checking for > Qt 5.7... yes
  checking for main in -limm32... yes
  checking for main in -lz ... yes
  checking for library containing jpeg_create_decompress ... configure: WARNING: libjpeg not found. Assuming qt has it built-in
  no
  checking for library containing png_error ... -lqtlibpng
  checking for library containing pcre2_match_16... -lqtpcre2
  checking for library containing hb_ot_tags_from_script ... -lqtharfbuzz
  ```

  We are passing `-qt-libjpeg` to Qt:
  e6e99d4f75/depends/packages/qt.mk (L66)
  but I dont think we are doing anything with `jpeg` related regardless?

ACKs for top commit:
  laanwj:
    ACK f509e3b8ce
  promag:
    ACK f509e3b8ce.

Tree-SHA512: 61ea20c11df11b9d426644df9a01aac12b76897003121a283fc784a8c30e9b5ad34c9805069fec20926f7aa279e59528e2e13697a944a22760c3acb6366fffbe
2019-07-29 15:33:01 +02:00
Wladimir J. van der Laan f735851be2
Merge #16467: rpc: sendrawtransaction help privacy note
07e01d6258 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 07e01d6258.
  laanwj:
    ACK 07e01d6258

Tree-SHA512: 427b3ca29384eef271eb496b7b14e883220863543a536ddeb31940aaffd52ea0b607d929d50f2b7958514105ef7823fa05c1ee381d4a432808753c06bd97af58
2019-07-29 14:52:01 +02:00
MarcoFalke 502ec02272
Merge #16424: build: Treat -Wswitch as error when --enable-werror
fabfcb5d8e build: Treat -Wswitch as error when --enable-werror (MarcoFalke)

Pull request description:

  By default we set `-Wall`, which enabled `-Wswitch`, so this already prints warnings. However, it can be additionally be turned into an error when `--enable-werror` to be extra safe.

ACKs for top commit:
  practicalswift:
    utACK fabfcb5d8e
  Empact:
    ACK fabfcb5d8e

Tree-SHA512: f6bd6dba93a4f3740811eb338b6db93b4f72d237afe848aefd212abecaf4f430c5a417ccb2f9fec0bdbc46001176f0cfa0bbf4d99a7fcf0e34dca4a9476e8456
2019-07-29 08:21:30 -04:00
Aaron Clauson e0324c3768
Updated python command in readme so it will work on systems that have both python2 and 3 installed. 2019-07-29 10:16:22 +02:00
fanquake 5c2885f9b2
Merge #16481: Trivial: add missing space
16b3748189 Trivial: add missing space (David A. Harding)

Pull request description:

  A space was lost when the `PACKAGE_NAME` variable was introduced at https://github.com/bitcoin/bitcoin/pull/16366/files#diff-6e30027c2045842fe842430d98d099fbR143 , e.g. when running `bitcoind -daemon` on Linux before this commit, I see `Bitcoin Coredaemon starting`.  This commit adds back the space.

ACKs for top commit:
  fanquake:
    ACK 16b3748189

Tree-SHA512: 3b0c5ed91838f0254b0aa064d1839f90fb64b2ade82bc3f6233d287b553528da5315017cb9a1d3f2b1882a010343b18a5308ae63ca4e3d47e83e8c5b532ddf5f
2019-07-29 07:49:53 +08:00
David A. Harding 16b3748189
Trivial: add missing space 2019-07-28 13:33:10 -10:00
MarcoFalke 3489b71512
Merge #16464: [qa] Ensure we don't generate a too-big block in p2sh sigops test
bf3be5297a [qa] Ensure we don't generate a too-big block in p2sh sigops test (Suhas Daftuar)

Pull request description:

  There's a bug in the loop that is calculating the block size in the p2sh sigops test -- we start with the size of the block when it has no transactions, and then increment by the size of each transaction we add, without regard to the changing size of the encoding for the number of transactions in the block.

  This might be fine if the block construction were deterministic, but the first transaction in the block has an ECDSA signature which can be variable length, so we see intermittent failures of this test when the initial transaction has a 70-byte signature and the block ends up being one byte too big.

  Fix this by double-checking the block size after construction.

ACKs for top commit:
  jonasschnelli:
    utACK bf3be5297a
  jnewbery:
    tested ACK bf3be5297a

Tree-SHA512: f86385b96f7a6feafa4183727f5f2c9aae8ad70060b574aad13b150f174a17ce9a0040bc51ae7a04bd08f2a5298b983a84b0aed5e86a8440189ebc63b99e64dc
2019-07-28 10:12:49 -04:00
fanquake 94df084f2a
Merge #16468: Exclude depends/Makefile in .gitignore
a33936737f Exclude depends/Makefile in .gitignore (João Barbosa)

Pull request description:

  At least atom editor does't show the file - it doesn't check the file is committed.

ACKs for top commit:
  dongcarl:
    utACK a33936737f
  fanquake:
    utACK a33936737f

Tree-SHA512: cff8b64ad3b78ded7eab4c58aa2fcdb49138631346a7ca75d2e5aa5937814a1038161b57a4eba5fef2204532eea5b83d683b40be4e3cb0e1fe73adde06dbe850
2019-07-28 15:14:47 +08:00
MarcoFalke fa6f22bf44
wallet: Rename CWalletKey to OldKey 2019-07-27 16:32:30 -04:00
MarcoFalke fa6dc7fa5f
wallet: Enumerate walletdb keys 2019-07-27 16:31:34 -04:00
Jon Atack 07e01d6258
rpc: sendrawtransaction unconditionality/privacy note
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-27 19:43:44 +02:00
MeshCollider febf3a856b
Merge #15588: Log the actual wallet file version and no longer publicly expose the "version" record
35e60e790f Remove ReadVersion and WriteVersion (Andrew Chow)
b3d4f6c961 Log the actual wallet file version (Andrew Chow)
c88e87c3b2 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 35e60e790f. 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 35e60e790f

Tree-SHA512: f782b2f215d07fbc9b806322bda8085445b81c02b65ca674a8c6a3e1de505a0abd050669afe0ead4778816144a1c18462e13930071cedb7227a058aeb39493f7
2019-07-27 22:45:31 +12:00
MeshCollider 1139e3cb76
Merge #16415: Get rid of PendingWalletTx class
4d94916f0d 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. e10e1e8db0 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 4d94916f0d, refactor looks good to me.
  meshcollider:
    utACK 4d94916f0d

Tree-SHA512: f3f93d2f2f5d8f1e7810d609d881c1b1cbbaa8629f483f4293e20b3210292605e947bc4903fde9d2d8736277ca3bd6de182f7eac1e13515d5a327f2ebc130839
2019-07-27 22:35:32 +12:00
MeshCollider dfb7fd60f2
Merge #16402: Remove wallet settings from chainparams
fa4a605a4c 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 fa4a605a4c, missed s/2018/2019?
  practicalswift:
    utACK fa4a605a4c
  darosior:
    ACK fa4a605a4c

Tree-SHA512: 2b3a5ee85d36af290d7db80bed1339e3c684607f1ce61cc65c906726e9174e40325fb1f67a34d8780f2a61fa39a1785e7c3a1cef5b6d6c364f38db5300cdbe3a
2019-07-27 22:29:09 +12:00
MeshCollider c606e6fc53
Merge #15996: rpc: Deprecate totalfee argument in bumpfee
2f7eb772f6 Add RPC bumpfee totalFee deprecation test (Jon Atack)
a92d9ce8cf 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 2f7eb772f6. Only change since last review is leaving IsDeprecatedRPCEnabled in its happy home, and switching to rpcEnableDeprecated instead. (Thanks!)
  jonatack:
    ACK 2f7eb772f6. 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 2f7eb772f6

Tree-SHA512: c97465205ee59575df37894bcbb6c4ecf8858dd8fe9d89503f9342b226768c1dcb553153bc9eb3055f7bf5eb41573e48b8efa57e083cd255793cbe5280f0026a
2019-07-27 22:22:03 +12:00
John Newbery 42a5e912ee [mempool] log correct messages when CPFP fails 2019-07-26 16:21:26 -04:00
MarcoFalke dbf4f3f86a
Merge #16301: Use CWallet::Import* functions in all import* RPCs
40ad2f6a58 Have importwallet use ImportPrivKeys and ImportScripts (Andrew Chow)
78941da5ba Optionally allow ImportScripts to set script creation timestamp (Andrew Chow)
94bf156f39 Have importaddress use ImportScripts and ImportScriptPubKeys (Andrew Chow)
a00d1e5ec5 Have importpubkey use CWallet's ImportScriptPubKeys and ImportPubKeys functions (Andrew Chow)
c6a8274247 Have importprivkey use CWallet's ImportPrivKeys, ImportScripts, and ImportScriptPubKeys (Andrew Chow)
fae7a5befd Log when an import is being skipped because we already have it (Andrew Chow)
ab28e31c95 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 40ad2f6a58 (checked that behavior changes are mentioned in the commit body)
  ryanofsky:
    utACK 40ad2f6a58. 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-26 15:19:24 -04:00
Jon Atack 2f7eb772f6 Add RPC bumpfee totalFee deprecation test
Next steps: remove `totalFee` from the wallet_bumpfee functional tests.
2019-07-26 14:09:03 -04:00
Gregory Sanders a92d9ce8cf deprecate totalFee argument in bumpfee RPC call 2019-07-26 14:09:03 -04:00
João Barbosa a33936737f Exclude depends/Makefile in .gitignore 2019-07-26 18:24:52 +01:00
Wladimir J. van der Laan a54a12046e
Merge #16386: depends: disable unused Qt features
248e22bbc0 depends: disable unused Qt features (fanquake)

Pull request description:

  Related to #16354. Kept separate from #16370, because:

  > QT is a monster 😂 - dongcarl in #bitcoin-builds

  I've done some basic testing on `macOS 10.14` and `Debian 9.9` so far. Would be good to have someone test on Windows.

  I was thinking about adding some inline documentation, i.e info about where to find the lists of Qt features & libraries, as well as breaking the flags up so that it's clearer which libraries we are supplying, which we rely on Qt for etc. Could go towards addressing  some of`2` in #16354.

ACKs for top commit:
  sipsorcery:
    tACK 248e22bbc0 (Windows 10 test only)
  laanwj:
    ACK 248e22bbc0

Tree-SHA512: 2cdcea8d268de21d355a7625c4d352f65728df0b8d8cc0f396aca676f42099a819f95652dfbfc665c991ba12c52735c1e9b693df4b12e3ee178fd39356fba8e0
2019-07-25 22:15:52 +02:00
Suhas Daftuar bf3be5297a [qa] Ensure we don't generate a too-big block in p2sh sigops test 2019-07-25 14:43:30 -04:00
MarcoFalke fcc4025c12
Merge #16459: [qa] Fix race condition in example_test.py
d9ab0ffa38 [qa] Fix race condition in example_test.py (Suhas Daftuar)

Pull request description:

  There's a race between sending a getdata for a bunch of blocks with the node receiving those blocks from a peer, which could cause test failure.  Fix this.

ACKs for top commit:
  MarcoFalke:
    ACK d9ab0ffa38
  laanwj:
    ACK  d9ab0ffa38
  promag:
    ACK d9ab0ffa38.

Tree-SHA512: c891f209eb2492f44e47da52ee6df950ff874ae26d2739011aca940d1caff6cedbac032b6509adbed07044c14fd711ba9d4d0e35c0f70bb2691f2ea4a46672ed
2019-07-25 12:54:09 -04:00