Commit graph

18512 commits

Author SHA1 Message Date
Mason Simon
8640631ebc
docs: Document lint tests 2018-10-20 13:09:05 +08:00
Pieter Wuille
544f323438
Merge #14512: docs: Textual improvements in README.md
b6b9915318 Textual improvements (Martin Erlandsson)

Pull request description:

  Just added a few commas in the right places, to increase readability.
  (Also, getting my feet wet in regards to the contribution process...)

Tree-SHA512: 9281af792436efe916e898b34fe20e909291d0c0917e8ccdc4a2af78cf9b6ba7736c554e53b6dbe1d9392b7583b33c3d77b769ab6424c3d7a65513535811878c
2018-10-19 19:24:50 -07:00
Pieter Wuille
91482e5bf2
Merge #14460: tests: Improve 'CAmount' tests
29ed2d64f6 Improve CAmount tests (Hennadii Stepanov)

Pull request description:

  This provides:
    - more `MoneyRange` tests;
    - new `CFeeRate` constructor tests with zero byte size;
    - explicit using of the `CAmount` type.

Tree-SHA512: ca0ad6ccb37909a2a5c11034dc07b316a84c32fb40c6f8b6cfc28ebec72a1de157f31d22e767ae80d70ed06d7296f23870cc5ed0689f34a754ae763d50e23d43
2018-10-19 19:23:43 -07:00
Pieter Wuille
e754c6e331
Merge #14011: Disable wallet and address book Qt tests on macOS minimal platform
a3197c5294 Disable wallet and address book Qt tests on macOS minimal platform (Russell Yanofsky)

Pull request description:

  macOS minimal platform is frequently broken, and these are currently failing with Qt 5.11.1.

  The tests do pass when run on the full cocoa platform (with `test_bitcoin-qt -platform cocoa`).

  Stack trace from test crash: https://gist.github.com/ryanofsky/3401fb63c52d13d5585e7fc777361f1e

Tree-SHA512: a05644ef15d75ea7d7f85ea804c6a5fe78e4e7358b189cbab639d9f7dc46163a35f77f7a2b4ae2fd6be5b9fb22898386b4d88069d5ee8d5fdbd995157c6f0846
2018-10-19 19:14:07 -07:00
Pieter Wuille
dc1e54206d
Merge #14474: bitcoin-tx: Use constant for n pubkeys check
1f01fe0257 bitcoin-tx: Use constant for n pubkeys check (Antoine Le Calvez)

Pull request description:

  Use the constant for the maximum number of public keys in a multisig script defined in script/script.h instead of hardcoding it.

Tree-SHA512: 83e6c46df907944d0d993159955e402784415536d61fdb5a5becba2b042e37ad2a291b27301c1b169416cb71c823a571d82257512cd4a64848a27a24c875fcc6
2018-10-19 19:02:41 -07:00
Pieter Wuille
b2863c0685
Merge #14426: utils: Fix broken Windows filelock
369244f654 utils: Fix broken Windows filelock (Chun Kuan Lee)

Pull request description:

  Fix broken filelock on Windows, also add a test for this. It's a regression introduced by #13862.

Tree-SHA512: 15665b1930cf39ec71f3ab07def8e2897659f6fd4d2de749d63a5a8ec920e4a04282f12bc262f242b1b3d14d2dd9fa191ddbcf16a46fb927b5b2b14d9f6b5d01
2018-10-19 18:59:47 -07:00
Pieter Wuille
b14db5abab
Merge #14513: Avoid 1 << 31 (UB) in calculation of SEQUENCE_LOCKTIME_DISABLE_FLAG
bc60c615a5 Avoid 1 << 31 (UB) in calculation of SEQUENCE_LOCKTIME_DISABLE_FLAG (practicalswift)

Pull request description:

  Avoid `1 << 31` (UB) in calculation of `SEQUENCE_LOCKTIME_DISABLE_FLAG`.

  Context: https://github.com/bitcoin/bitcoin/pull/14510#issuecomment-431153707

Tree-SHA512: bdb4a913c6a82ff1a455ba67d3351f6408ff4116574329361644b483fea96b801fdc5c5659233856b591cd3a46ec669d3b5b438553e4240d7099c560eae2e2ae
2018-10-19 18:52:42 -07:00
Pieter Wuille
8010ded6da
Merge #14524: Trivial: fix typo
7e18673f04 Fix typo (Kristaps Kaupe)

Pull request description:

Tree-SHA512: 3f3557d9aad007562b780e34c25584d0de6f240cb9ff56779d224bf9b8cd7bd657c92a73222fd8d7f679c282dce6a75265ca61e20d50a834caa4a9f21a286b3a
2018-10-19 18:44:51 -07:00
Kristaps Kaupe
7e18673f04 Fix typo 2018-10-20 02:55:41 +03:00
Pieter Wuille
d387507aec
Merge #14465: tests: Stop node before removing the notification file
ca6d86c322 tests: Stop node before removing the notification file (Chun Kuan Lee)

Pull request description:

  Stop node before removing the notification file to make sure the command has been terminated. After then we could removing those files safely and do not receive any permission error. (See #14446)

  The permission error is Windows specific, documented in python doc:
  >On Windows, attempting to remove a file that is in use causes an exception to be raised

  See https://docs.python.org/3/library/os.html#os.remove

Tree-SHA512: fbdabf3a9a838bb59ba207dd9e9fbdd87c702a99ad66bee0b2b1537f80f8630d22d9d5e9c4ded23a82a66bfc10989227fb024b27393425abe0e5a2ad4e4cbb82
2018-10-18 22:52:49 -07:00
Wladimir J. van der Laan
8eb2cd1dda
Merge #14291: wallet: Add ListWalletDir utility function
d56a068935 docs: Add release notes for listwalletdir RPC (João Barbosa)
0cb3cad166 qa: Add tests for listwalletdir RPC (João Barbosa)
cc3377360c rpc: Add listwalletdir RPC (João Barbosa)
d1b03b8e5f interfaces: Add getWalletDir and listWalletDir to Node (João Barbosa)
fc4db35bfd wallet: Add ListWalletDir utility (João Barbosa)

Pull request description:

  `ListWalletDir` returns all available wallets in the current wallet directory.

  Based on MeshCollider work in pull #11485.

Tree-SHA512: 5843e3dbd1e0449f55bb8ea7c241a536078ff6ffcaad88ce5fcf8963971d48c78600fbc4f44919523b8a92329d5d8a5f567a3e0ccb0270fdd27366e19603a716
2018-10-19 01:01:17 +02:00
João Barbosa
d56a068935 docs: Add release notes for listwalletdir RPC 2018-10-18 23:26:06 +01:00
João Barbosa
0cb3cad166 qa: Add tests for listwalletdir RPC 2018-10-18 23:26:06 +01:00
João Barbosa
cc3377360c rpc: Add listwalletdir RPC 2018-10-18 23:26:06 +01:00
João Barbosa
d1b03b8e5f interfaces: Add getWalletDir and listWalletDir to Node 2018-10-18 23:26:06 +01:00
João Barbosa
fc4db35bfd wallet: Add ListWalletDir utility
ListWalletDir returns all available wallets in the current wallet directory.

Based on MeshCollider work in pull #11485.
2018-10-18 23:26:06 +01:00
practicalswift
bc60c615a5 Avoid 1 << 31 (UB) in calculation of SEQUENCE_LOCKTIME_DISABLE_FLAG 2018-10-18 23:14:20 +02:00
Wladimir J. van der Laan
3715b2489e
Merge #14510: Avoid triggering undefined behaviour in base_uint<BITS>::bits()
96f6dc9fc5 Avoid triggering undefined behaviour in base_uint<BITS>::bits() (practicalswift)

Pull request description:

  Avoid triggering undefined behaviour in `base_uint<BITS>::bits()`.

  `1 << 31` is undefined behaviour in C++11.

  Given the reasonable assumption of `sizeof(int) * CHAR_BIT == 32`.

Tree-SHA512: 995fa38e71c8921873139ecf1b7dd54178555219af3be60d07290f379439ddd8479e3963c6f3cae8178efb61063a0f9add6cba82a5578d13888597b5bcd54f22
2018-10-18 22:55:44 +02:00
Chun Kuan Lee
369244f654 utils: Fix broken Windows filelock 2018-10-19 02:29:25 +08:00
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
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
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
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
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
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
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
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