Commit graph

18618 commits

Author SHA1 Message Date
Martin Erlandsson b6b9915318
Textual improvements 2018-10-18 14:39:27 +02:00
Wladimir J. van der Laan fe23553edd
Merge #14374: qt: Add "Blocksdir" to Debug window
2ab9140c92 Add tooltips for both datadir and blocksdir (Hennadii Stepanov)
3045704502 Add "Blocksdir" to Debug window (Hennadii Stepanov)

Pull request description:

  To get the current `blocksdir` is valuable for debug purposes after
  merging #12653.

  ![screenshot from 2018-10-02 23-16-52](https://user-images.githubusercontent.com/32963518/46374770-2ef6f580-c69a-11e8-85c2-44a49fa36b28.png)

Tree-SHA512: a93f2c00ee19cf6acb499d3bd9bccf4be8ef01c53c44d917ad401aa4797db02cbccb71a9c24e05262ea09345e15f9299381367fdc6951f21dd3788a4a58d2132
2018-10-18 12:31:20 +02:00
Wladimir J. van der Laan 32c5f188d4
Merge #14177: qt: Set C locale for amountWidget
b0510d78ae Set C locale for amountWidget (Hennadii Stepanov)

Pull request description:

  Fix #13873

Tree-SHA512: ef26b35ef83c3a87ebd90650f6d833b00a24f6c114b68fe01acd4a14d1f5bdec066f438eb7781c1e55c32640838c54e00b8f082c390639ade8d9a58830833d4a
2018-10-18 12:26:16 +02:00
practicalswift 96f6dc9fc5 Avoid triggering undefined behaviour in base_uint<BITS>::bits() 2018-10-18 11:17:05 +02:00
Wladimir J. van der Laan d98777f302
Merge #14146: wallet: Remove trailing separators from -walletdir arg
2d471636eb wallet: Remove trailing separators from -walletdir arg (Pierre Rochard)
ea3009ee94 wallet: Add walletdir arg unit tests (Pierre Rochard)

Pull request description:

  If a user passes in a path with a trailing separator as the `walletdir`, multiple BerkeleyEnvironments may be created in the same directory which can lead to data corruption.

  Discovered while reviewing https://github.com/bitcoin/bitcoin/pull/12493#issuecomment-417147646

Tree-SHA512: f2bbf1749d904fd3f326b88f2ead58c8386034355910906d7faea155d518642e9cd4ceb3cae272f2d9d8feb61f126523e1c97502799d24e4315bb53e49fd7c09
2018-10-18 10:58:59 +02:00
Wladimir J. van der Laan 9c5f0d542d
Merge #13878: utils: Add fstream wrapper to allow to pass unicode filename on Windows
43c7fbb1e7 Make MSVC compiler read the source code using utf-8 (Chun Kuan Lee)
f86a571edb tests: Add test case for std::ios_base::ate (Chun Kuan Lee)
a554cc901a Move boost/std fstream to fsbridge (Chun Kuan Lee)
86eb3b3f1a utils: Add fsbridge fstream function wrapper (Chun Kuan Lee)

Pull request description:

  If compiled with mingw, use glibc++ extension `stdio_filebuf` to open the file by `FILE*` instead of filename.

  In other condition, we can use boost::fstream.

Tree-SHA512: b5dbd83e347fb9b2a0c8b1c2c7bd71a272e839ec0617883b2a0ec12506ae9e825373cf6e95b9bcc91d7edc85bf51580a7716b56a9ecaad776bc3ae61638cb3da
2018-10-18 10:36:51 +02:00
Wladimir J. van der Laan 041224a75c
Merge #14472: [doc] getblocktemplate: use SegWit in example
d562027079 [doc] getblocktemplate: use SegWit in example (Sjors Provoost)

Pull request description:

  Make it less likely for new miners to accidentally mine non-SegWit blocks.

  Suggest backport to 0.17 so the docs on bitcoincore.org get updated at the next minor release.

Tree-SHA512: fc8c51690559d3e64d03c0eec433c75e5581d616d36b529e16f89ff2433457386feba7ef3b0d22f245d3f725183a2204fef7ee13e25cb92b945ab61f99068dee
2018-10-18 09:54:33 +02:00
John Newbery 2b91e42ece [docs] Add release note for removing getwitnessaddress 2018-10-17 15:00:50 -04:00
Jonas Schnelli 816fab9cca
Merge #14450: qt: Fix QCompleter popup regression
081cc02a9 Fix QCompleter popup regression (Hennadii Stepanov)

Pull request description:

  The PR #8129 has introduced a regression with the `QCompleter` popup in the Debug window.

  How to reproduce:

  1.  open the Debug window;
  2.  go to the 'Console' tab;
  3.  start writing some RPC command and try to pick it from the list using arrow keys, press Enter.

  Note that the popup used to display completions is not being closed. To close it they should mouse click somewhere outside of the popup.

  The wrong behaviour of the `QCompleter` popup is observed on Linux Mint 19 and Windows 10.
  This PR fixes this regression.

  Refs:

  - #7613
  - #7772
  - #8129

Tree-SHA512: f3ba8d08e1c07619d4ef307544306b57be43e4e726770976cf0c2af95082bd66e2eefe8aabb9a3fad0601cd9e6e4dea0459b6a63eba512023234feb308484655
2018-10-17 20:25:35 +02:00
Russell Yanofsky eeeaa29214 descriptors.md: Refer to descriptors as describing instead of matching 2018-10-17 11:41:22 -04:00
Wladimir J. van der Laan 3036faf51a
Merge #14496: build: Pin to specific versions of Python packages we install from PyPI in Travis
ee0b7c4e8a build: Pin to specific versions of Python packages we install from PyPI in Travis (practicalswift)

Pull request description:

  Pin to specific versions of Python packages we install from PyPI in Travis.

  To avoid the possibility of surprise build failures when a new version of a PyPI dependency is released.

Tree-SHA512: 1c9abc094ad6b38992d0e7a5dd7f6c6c070a2eb81b052eb2397c1f1a489162cf8cedbd33db9bf97f32a81ed4dd0e986a76815c623a9b6c04b6ca6c5832d68211
2018-10-17 16:01:13 +02:00
Pieter Wuille 27bf14f6f3
Merge #14495: build: Warn (don't fail!) on spelling errors
c32cf6a0f2 Add ignored word: mut (practicalswift)
4ae50daaa7 Revert "qa: Fix codespell error and have lint-spelling error instead of warn" (practicalswift)

Pull request description:

  Revert `codespell` policy change introduced in #14179.

  Context: https://github.com/bitcoin/bitcoin/pull/13954#issuecomment-430200183

Tree-SHA512: 4606b19bb32cdd661f90b3778759818d3493e5ed1a4a2f95982f07eeb6b9c889bc8d53cde31706e0a3b9524c3d3a7378f1b769a60baeb0d00da4c68fd3068114
2018-10-17 00:24:19 -07:00
John Newbery c269209336 [tests] Small fixups before deprecating generate
In advance of deprecating the generate RPC method, make some small
changes to a small number of inidividual test cases:

- make memory checking less prescriptive in wallet_basic.py
- replace calls to generate with generatetoaddress in wallet_keypool.py
- replace calls to generate with generatetoaddress and fixup label
  issues in wallet_labels.py
- replace calls to generate with generatetoaddress in wallet_multiwallet.py
2018-10-16 11:27:13 -04:00
Wladimir J. van der Laan 23419e4c49
Merge #14335: net: refactor: cleanup ThreadSocketHandler
032488e6e7 Move SocketHandler logic to private method. (Patrick Strateman)
2af9cff11a Move InactivityCheck logic to private method. (Patrick Strateman)
7479b63d91 Move DisconnectNodes logic to private method. (Patrick Strateman)
edb5350c32 Move NotifyNumConnectionsChanged logic to private method. (Patrick Strateman)

Pull request description:

  Working towards using poll() on unix like systems.

  A number of small changes designed to separate the actual socket handling from the rest of the logic in ThreadSocketHandler.

  This is a simpler version of #14147

Tree-SHA512: 72f35c8ef7649019dcbfe19537d8c9f7e3d0fc5854dc691a70c5573352230fc31c3f55565820c632e9b8cb3c55b878bed19e0ad9423100762197ac35967d8067
2018-10-16 17:20:34 +02:00
practicalswift ee0b7c4e8a build: Pin to specific versions of Python packages we install from PyPI in Travis 2018-10-16 13:48:16 +02:00
practicalswift c32cf6a0f2 Add ignored word: mut 2018-10-16 13:34:10 +02:00
practicalswift 4ae50daaa7 Revert "qa: Fix codespell error and have lint-spelling error instead of warn"
This reverts commit e413c2ddd1.
2018-10-16 13:33:05 +02:00
Wladimir J. van der Laan 2468471e13
Merge #14403: qt: Revert "Force TLS1.0+ for SSL connections"
7d173c4cd1 qt: Revert "Force TLS1.0+ for SSL connections" (Tim Ruffing)

Pull request description:

  This reverts commit 15e26a6a9a, whose
  purpose was to tweak the Qt configuration to force TLS, i.e., to
  disable SSLv3, in Qt versions >= 5.5. However, the default behavior
  of Qt >= 5.4 is to disable SSLv3 anyway [1], so the configuration
  tweak is redundant.

  With Qt 5.11.2, the configuration tweak is not only redundant but in
  fact provokes a deadlock due to a bug in Qt 5.11.2. Since the deadlock
  occurs at the early startup stage of bitcoin-qt, it renders bitcoin-qt
  entirely non-functional when compiled against Qt 5.11.2 (and maybe
  other Qt versions).

  Fixes #14359.

  [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=3fd2d9eff8c1f948306ee5fbfe364ccded1c4b84

Tree-SHA512: 9dd86557b8d265dfa56592924778a736590f2e6a0b2acf77d4f9f4200206a9edaa79b144b0085ea59ac0cc1bc66d9740402fd02f9298ff74c8d6f526f3f725d6
2018-10-16 07:04:22 +02:00
Wladimir J. van der Laan 9bd3ff430b
Merge #14383: qt: Clean system tray icon menu for '-disablewallet' mode
36323e2ac6 Clean systray icon menu for -disablewallet mode (Hennadii Stepanov)

Pull request description:

  There is a `Debug window` leftover in the system tray icon menu after #3392 merging.
  This PR makes both the app menu and the systray icon menu consistent.

Tree-SHA512: c9ef58785fe2a54bc6f778140a16001748ed8c46da948656822b86fdc2e224203cd467857f71d00ce56fc73ff2590c46d8c234a54c261c1141d83039de6fee1e
2018-10-16 06:54:07 +02:00
Jonas Schnelli 2a2cac7873
Merge #14424: Stop requiring imported pubkey to sign non-PKH schemes
2f6b466ae Stop requiring imported pubkey to sign non-PKH schemes (Pieter Wuille)

Pull request description:

  ...

  This is a fix for #14415

Tree-SHA512: 113b4ddfbdfcce7dbaa15c565ac7ec68d16127aa4d47628e0801f2437cbe369e0fa8beb0de191d43dcb2f8cbb6f1bf8d79a5db0f4e352f38fe7280124475710a
2018-10-15 12:50:02 +02:00
Eric Scrivner d4d70eda33 Fix listreceivedbyaddress not taking address as a string
Fixes #14173. Add the patch in #14173 and include a regression test.
2018-10-14 09:48:06 -07:00
Hennadii Stepanov 081cc02a98
Fix QCompleter popup regression
The PR #8129 has introduced a regression with the QCompleter popup in
the Debug window.

How to reproduce:
  1) open the Debug window;
  2) go to the 'Console' tab;
  3) start writing some rpc command and try to pick it from the list
using arrow keys, press Enter.
Note that the popup used to display completions is not being closed. To
close it they should mouse click somewhere outside of the popup.
2018-10-13 14:19:38 +03:00
Antoine Le Calvez 1f01fe0257 bitcoin-tx: Use constant for n pubkeys check
Use the constant for the maximum number of public keys in a multisig
script defined in script/script.h instead of hardcoding it.
2018-10-13 10:55:51 +01:00
Sjors Provoost d562027079
[doc] getblocktemplate: use SegWit in example 2018-10-13 17:15:08 +09:00
Chun Kuan Lee ca6d86c322 tests: Stop node before removing the notification file 2018-10-12 05:57:58 +08:00
Hennadii Stepanov 29ed2d64f6
Improve CAmount tests
This provides:
  - more `MoneyRange` tests;
  - new `CFeeRate` constructor tests with zero byte size;
  - explicit using of the `CAmount` type.
2018-10-10 23:27:51 +03:00
practicalswift 0089905361 Add compile time checking for cs_main locks which we assert at run time 2018-10-10 11:28:43 +02:00
James O'Beirne 94e21c1501 test: forward timeouts properly in send_blocks_and_test 2018-10-10 02:51:19 -04:00
MarcoFalke be992701b0
Merge #14373: Consistency fixes for RPC descriptions
b8edb9810a [rpc] Descriptions: Textual consistency fixes (Jon Layton)

Pull request description:

Tree-SHA512: fa22ddac94e95672579cc84309f1c3ea3a2dbf762e45a8ae9c121c4c5188bf8c19ff9458d49dd7ef760c3ae4226487612a2954e9a1a0e8b720116afeb718b46b
2018-10-10 00:59:57 -03:00
MarcoFalke dc8e6d04ea
Merge #14455: build: unbreak make clean
a48e44bd4f Fix CLEAN_BITCOIN_TEST to remove .log files for all BITCOIN_TESTS files (James O'Beirne)

Pull request description:

  My preferred alternative to https://github.com/bitcoin/bitcoin/pull/14440 (I'm too lazy to review an entire file move). This just applies a `.log` suffix addition to all `BITCOIN_TESTS` files for the purposes of cleaning, and thus doesn't erroneously remove test/scriptnum10.h.

Tree-SHA512: 06a0d9fb2c4851f4e74215aa4bca9cf81f49787f16c46b0172e5c1cf18ca744d747c5b0c1564cac433e0dea29b0afabd2d95f0f58a0157d1e05b2b7cb7800e00
2018-10-10 00:40:16 -03:00
James O'Beirne a48e44bd4f Fix CLEAN_BITCOIN_TEST to remove .log files for all BITCOIN_TESTS files 2018-10-09 22:31:51 -04:00
Jon Layton b8edb9810a [rpc] Descriptions: Textual consistency fixes
'Must be one of' should always end in a ':'

'hex encoded' is now always 'hex-encoded'

Remove redundant '(defaults to CONSERVATIVE)' text from estimatesmartfee

Consistent spacing for options '( verbose )' and '( verbosity )'

'BIP125 replaceable' is now always 'BIP125-replaceable'

JSON-RPC example is now always 'As a JSON-RPC call'
2018-10-09 08:42:19 -05:00
practicalswift 69e7ee2dd8 Add GUARDED_BY(cs_wallet) for setExternalKeyPool, mapKeyMetadata, m_script_metadata and setLockedCoins 2018-10-09 15:04:26 +02:00
practicalswift 37b2538c2d Add GUARDED_BY(cs_wallet) for encrypted_batch, nWalletMaxVersion, m_max_keypool_index and nOrderPosNext
* AddKeyPubKeyWithDB(...) reads encrypted_batch which potentially races with write in the same method.
* IncOrderPosNext(...) reads nOrderPosNext which potentially races with write in BlockDisconnected(...).
* LoadKeyPool(...) reads m_max_keypool_index which potentially races with write in BlockDisconnected(...).
* LoadMinVersion(...) reads nWalletMaxVersion which potentially races with write in BlockDisconnected(...).
2018-10-09 12:12:27 +02:00
practicalswift dee42927c9 wallet: Add Clang thread safety analysis annotations 2018-10-09 11:58:32 +02:00
practicalswift 1c7e25db0c wallet: Add missing locks 2018-10-09 11:58:32 +02:00
Tim Ruffing 7d173c4cd1 qt: Revert "Force TLS1.0+ for SSL connections"
This reverts commit 15e26a6a9a, whose
purpose was to tweak the Qt configuration to force TLS, i.e., to
disable SSLv3, in Qt versions >= 5.5. However, the default behavior
of Qt >= 5.4 is to disable SSLv3 anyway [1], so the configuration
tweak is redundant.

With Qt 5.11.2, the configuration tweak is not only redundant but in
fact provokes a deadlock (#14359) due to Qt 5.11.2 being incompatible
with OpenSSL 1.1.1 [2]. Since the deadlock occurs at the early startup
stage of bitcoin-qt, it renders bitcoin-qt entirely non-functional
when compiled against OpenSSL 1.1.1 and Qt 5.11.2 (and possible future
combinations of OpenSSL and Qt versions).

This commit fixes #14359 by removing the redundant code.

[1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=3fd2d9eff8c1f948306ee5fbfe364ccded1c4b84
[2] https://bugreports.qt.io/browse/QTBUG-70956
2018-10-09 11:54:05 +02:00
Wladimir J. van der Laan 9dcf6c0dfe build: Add --disable-bip70 configure option
This patch adds a --disable-bip70 configure option that disables BIP70
payment request support. When disabled, this removes the dependency of
the GUI on OpenSSL and Protobuf.
2018-10-09 03:36:14 -06:00
MarcoFalke 1d1417430c
Merge #13115: addrman: Add Clang thread safety annotations for variables guarded by CAddrMan.cs
3e9f6c821b Add missing locks and locking annotations for CAddrMan (practicalswift)

Pull request description:

  * Add Clang thread safety annotations for variables guarded by `CAddrMan.cs `
  * Add missing `CAddrMan.cs ` locks

Tree-SHA512: c78d56d56eb63a4469333c04c95317545a8f97d5e3a36ff2699ee4a91a6433d416221eed6c5ff168e1e31f6936c2ae101a4c60b635f2b2309f40e3d66a727322
2018-10-09 00:54:30 -03:00
practicalswift 3e9f6c821b Add missing locks and locking annotations for CAddrMan 2018-10-08 17:19:25 +02:00
Hennadii Stepanov 2ab9140c92
Add tooltips for both datadir and blocksdir 2018-10-08 13:33:29 +03:00
MarcoFalke 4de0b5f39c
Merge #14385: depends: qt: avoid system harfbuzz and bz2
f149e31ea2 depends: qt: avoid system harfbuzz and bz2 (Cory Fields)

Pull request description:

  Should fix #14367.

  Gitian builds end up with this config implicitly due to missing harfbuzz system lib, this change explicitly disables the use of the lib completely, even if present.

  We may eventually want to break out harfbuzz and build it in depends, but for now just ensure that runtime dependencies don't depend on whether or not harfbuzz was present on the builder.

  @real-or-random Can you confirm that this fixes your issue?

Tree-SHA512: 1ad3dd572c1f2004ec80ebaf3b6831327b0267fb3dc1895e77bd04785cd6e32bafc931932195462bbae807289bc565f0ea740f4050d26f0233ddcd62bfdb0685
2018-10-08 05:27:28 -03:00
MarcoFalke a89896fadb
Merge #13649: test: allow arguments to be forwarded to flake8 in lint-python.sh
854c85ae90 test: allow arguments to be forwarded to flake8 in lint-python.sh (James O'Beirne)

Pull request description:

  In order to use `lint-python.sh` from within various in-editor linting frameworks (e.g. [ALE](https://github.com/w0rp/ale), [flycheck](https://github.com/flycheck/flycheck)), we need to allow its arguments to be forwarded to the wrapped flake8 invocation.

  For what it's worth, here's my bitcoin-specific ALE vim config for doing so (requires this changeset):
  ```vim
  $ grep python /home/james/src/bitcoin/.exrc

  let g:ale_python_flake8_executable="/home/james/src/bitcoin/test/lint/lint-python.sh"
  ```

Tree-SHA512: 0d5500238ea5fde26ee9c21f6518a3a3dc8409c77ad1271ff7e7a94ef45a8c8d2e1b8ad3df3075dd4062ee0fff534625b1bc79613f869cd3c2d9260814ffc7ee
2018-10-08 05:25:46 -03:00
MarcoFalke da32bd80bf
Merge #14253: Build: during 'make clean', remove some files that are currently missed.
3f5ac27205 Include some files currently missed by 'make distclean'. (murrayn)

Pull request description:

  `make clean` currently leaves behind some cache and test log files that should be removed.

Tree-SHA512: a1877e776e24232f6dd1468d7f392ea0bd1e93fdd975e623897d48c4b23a080a2e84ebb199f5482abd6b8c9ddd036850325e7b7ed07e2f9fe7a32f83cc99da4a
2018-10-08 04:32:48 -03:00
MarcoFalke d6189ff200
Merge #14390: docs: release process: RPC documentation
3b706212ad doc: RPC documentation (Karel Bílek)

Pull request description:

  The auto-generated RPC docs seem to work so far ( https://bitcoincore.org/en/doc/ + 0.17.0 https://github.com/bitcoin-core/bitcoincore.org/pull/618 ). There are some problems (the design of the list on the right is not ideal, and apparently the huge list of pages slows down jekyll), but that can be fixed later; people are already linking to the docs now and looking for them there

  So I am adding the RPC docs to the release process.

  The script is here and it is written in golang, since I am most confident in the language; if necessary, I can try to rewrite to python, which is more common in bitcoin tooling

  https://github.com/bitcoin-core/bitcoincore.org/tree/master/contrib/doc-gen

Tree-SHA512: ba1b7696bb7ceb6cee4ff222b006b8c18768dd9283a4130751714a782d75ea2ca33f8d9fc4a5263d85a2f001c254daa0cee3b09cc7cba7366c66c5a115d8352a
2018-10-08 03:01:34 -03:00
MarcoFalke 35e12e336b
Merge #14428: docs: Fix macOS files description in qt/README.md
0bd64dc6d6 Fix macOS files description (Hennadii Stepanov)

Pull request description:

Tree-SHA512: 9547bda4e2bcd2c823b6c344e8d34ebc24770b2926bbec0f5c11f192407386cddf5daaa4fc154f769df708319262ead72e699dab211afa5762a2def6203445fe
2018-10-08 02:54:56 -03:00
Pieter Wuille 2f6b466aeb Stop requiring imported pubkey to sign non-PKH schemes 2018-10-07 22:15:27 -07:00
MarcoFalke d12e3d9acc
Merge #14324: qa: Run more tests with wallet disabled
faa4043c66 qa: Run more tests with wallet disabled (MarcoFalke)

Pull request description:

  Instead of skipping the whole test, only skip the wallet specific section of a test if the wallet is not compiled in. This is mostly an indentation change, so can be reviewed with `--ignore-all-space`.

Tree-SHA512: 5941a8b6b00dca5cf9438c5f6f010ba812115188a69e427d7ade4c1ab8cfe7a57c73daf52c66235dbb24b1cd9ab7c7a17c49bc23d931e041b605d79116a71f66
2018-10-08 01:42:02 -03:00
MarcoFalke ab660c8e50
Merge #14413: tests: Allow closed rpc handler in assert_start_raises_init_error
62c304ea48 tests: Allow closed http server in assert_start_raises_init_error (Chun Kuan Lee)

Pull request description:

  The rpc handler may be unregistered when http server haven't been closed yet. So it may be allowable to get -342 `non-JSON HTTP response with \'%i %s\' from server` (503 Service Unavailable)

  See https://ci.appveyor.com/project/DrahtBot/bitcoin/build/master.2001. It shows "Rejecting request while shutting down" between "RPC stopped" and "Stopped HTTP server"

Tree-SHA512: e1f50ab9096cf23494ccc2850c01516c4a75f112c99108759157b22fce2011682a4b88216f206702f6a56e960182c00098053ad75f13aa0eafe27046adae63da
2018-10-08 01:29:22 -03:00
Chun Kuan Lee 62c304ea48 tests: Allow closed http server in assert_start_raises_init_error 2018-10-08 11:48:19 +08:00