Commit graph

19357 commits

Author SHA1 Message Date
Hennadii Stepanov 698d0f882a
Remove misplaced Q_UNUSED and others enhancements
Also this removes unused function parameters and improves comments.
2018-12-20 01:06:37 +02:00
MarcoFalke fa5c346c5a
doc: Add comment to cs_main and mempool::cs 2018-12-20 08:13:50 +13:00
MarcoFalke fa05d52af4
test: Bump timeout to run tests in travis thread sanitizer 2018-12-20 08:06:28 +13:00
Hennadii Stepanov c8d9d9093b
Fix broken notificator on GNOME
That bug was introduced in #14228.
2018-12-19 20:43:07 +02:00
Wladimir J. van der Laan cb52cee29d
Merge #14993: rpc: Fix data race (UB) in InterruptRPC()
6c10037f72 rpc: Fix data race (UB) in InterruptRPC() (practicalswift)

Pull request description:

  Fix data race (UB) in `InterruptRPC()`.

  Before:

  ```
  $ ./configure --with-sanitizers=thread
  $ make
  $ test/functional/test_runner.py feature_shutdown.py
  …
  SUMMARY: ThreadSanitizer: data race rpc/server.cpp:314 in InterruptRPC()
  …
  ALL                 | ✖ Failed  | 2 s (accumulated)
  ```

  After:

  ```
  $ ./configure --with-sanitizers=thread
  $ make
  $ test/functional/test_runner.py feature_shutdown.py
  …
  ALL                 | ✓ Passed  | 3 s (accumulated)
  ```

Tree-SHA512: b139ca1a0480258f8caa7730cabd7783a821d906630f51487750a6b15b7842675ed679747e1ff1bdade77d248807e9d77bae7bb88da54d1df84a179cd9b9b987
2018-12-19 16:03:34 +01:00
MarcoFalke f080c65a09
Merge #14875: RPCHelpMan: Support required arguments after optional ones
fa9a5bc1a0 RPCHelpMan: Support required arguments after optional ones (MarcoFalke)

Pull request description:

  There was a requirement that required arguments could not be positioned after an optional argument, but the deprecation of priority made the second argument to `prioritisetransaction` optional. So support that in `RPCHelpMan`.

  Also format all named arguments in the same way (without the wrapping `"` even for strings), since the extended description already mentions the type and it feels odd to special case strings.

Tree-SHA512: c125145afb4a63abc995aaf0a89489efc0f470a720727a1ca6ee0bfd2bcbc59e87c38128dd1e0cdf03dbb5b18e84867887c3dabf6ec8378e66cb1f4cecb9e407
2018-12-19 09:12:52 +13:00
MarcoFalke d4197812d4
Merge #14985: test: Remove thread_local from test_bitcoin
fa61202cae test: Add comment to g_insecure_rand_ctx (MarcoFalke)
fa0d3c4407 test: Undo thread_local g_insecure_rand_ctx (MarcoFalke)

Pull request description:

  `thread_local` seems to be highly controversial according to the discussion in #14953, so remove it again from the tests.

  Also remove boost::thread_group in the test that uses it, since I am touching it anyway.

Tree-SHA512: 977c1f597e3cfbd0e97d0b037d998fdbc701f62e9a2f57e02dbe1727b63ae8ff478dbd9d3d6dc4ffdfa23f2058b331f04949d51f23a8f55b41ecb75f088f1cbe
2018-12-19 07:40:53 +13:00
practicalswift 6c10037f72 rpc: Fix data race (UB) in InterruptRPC() 2018-12-18 18:52:12 +01:00
MarcoFalke f055389cb9
Merge #14829: travis: Enable functional tests in the ThreadSanitizer (TSan) build job
eaf4070e3a Add suppression for InterruptRPC (fRPCRunning) data race (practicalswift)
5e5138a721 travis: Use trap and set -e errtrace (Chun Kuan Lee)
069752b726 build: Enable functional tests in the ThreadSanitizer (TSan) build job (practicalswift)

Pull request description:

  Enable functional tests in the ThreadSanitizer (TSan) build job.

  This is a follow-up to @MarcoFalke's #14764 which added TSan but for unit tests only.

Tree-SHA512: dcc24d311fa124772c3036b16c2bf94732ece36c3e22b4bb8fe941772e52157ab2b1a90b1880b81079c2eef2d344ca7e1da58324b75dbf82d16204d591ad49fb
2018-12-19 06:35:29 +13:00
MarcoFalke b545a7e337
Merge #14950: docs: add NSIS setup/install steps to windows docs
82687b5034 docs: add NSIS setup/install steps to windows docs (luciana)

Pull request description:

  Supersedes #14744
  Fixes: #14699

  Rearranged the changes in #14744 to be more similar to the macOS docs.

Tree-SHA512: d68f952eee1a97702d23a02e4f35b66dedd3bf104b8ea05de9a642a596c476c40aa76fae5b00a1600b3758e25621226d89216885ec8f52acf89d6eb117421f9e
2018-12-18 12:30:04 -05:00
practicalswift eaf4070e3a Add suppression for InterruptRPC (fRPCRunning) data race 2018-12-18 09:33:02 +01:00
Jonas Schnelli e7b88ecbc9
Merge #14975: qt: Refactoring with QString::toNSString()
4d454dcb6 Refactoring with QString::toNSString (Hennadii Stepanov)

Pull request description:

  This PR makes `MacNotificationHandler::showNotification()` cleaner and more readable.
  The used `QString::toNSString()` function was introduced in Qt 5.2 which is minimum version now (#14725).

  The behavior of `MacNotificationHandler::showNotification()` has not been changed.

  cc: @jonasschnelli

Tree-SHA512: 940327a77746ee016415efd3b696ad8ec85dcf12bf3f62e55c9bdc1700415d81a8d03fbc79310982d37a4098786dcaef7cd9702db5498d59d8065447babc27f5
2018-12-17 19:53:51 -10:00
Murray Nesbitt 523785042b Modify build instructions to work with Command Prompt as well as
PowerShell; other minor changes
2018-12-18 05:23:38 +00:00
lucash-dev b301950df3 Made expicit constructor CTransaction(const CMutableTransaction &tx).
This makes the above constructor explicit. The rationale is that this conversion has very significant performance effects. Making it explicit makes it easier to reason about these performance trade-offs, and helps identify possible functions that need a CMutableTransaction version.
2018-12-17 21:02:42 -08:00
lucash-dev faf29dd019 Minimal changes to comply with explicit CMutableTransaction -> CTranaction conversion.
This commit makes the minimal changes necessary to fix compilation once CTransaction(const CMutableTransaction &tx) is made explicit. In each case an explicit call `CTransaction(...)` was added. Shouldn't affect behaviour or performance.
2018-12-17 21:02:42 -08:00
MeshCollider 27f5a295d7
Merge #14957: wallet: Initialize stop_block in CWallet::ScanForWalletTransactions
8b9171ccf wallet: Initialize stop_block to nullptr in CWallet::ScanForWalletTransactions (Ben Woosley)

Pull request description:

  Previously the argument would be untouched if the first block scan failed. This
  makes the behavior predictable, and consistent with the documentation.

Tree-SHA512: 3efadf9fd5e25ecd9450f32545f58e61a123ad883e921ef427b13e4782ffdd8ffe905c9ad3edc7e8f9e4953342cd72247bb4cc9eeaf9e5fd04291ac5c1bb5eec
2018-12-18 15:34:06 +13:00
Ben Woosley 8b9171ccf0
wallet: Initialize stop_block to nullptr in CWallet::ScanForWalletTransactions
Previously the argument would be untouched if the first block scan failed. This
makes the behavior predictable, and consistent with the documentation.
2018-12-17 13:07:12 -08:00
MarcoFalke fafe941bdd
test: Add missing validation locks 2018-12-17 14:27:29 -05:00
MarcoFalke fa61202cae
test: Add comment to g_insecure_rand_ctx 2018-12-17 13:13:02 -05:00
Ben Carman 84104c781a clarifying getrawtransaction[time] get help text 2018-12-17 11:04:40 -06:00
MarcoFalke fa0d3c4407
test: Undo thread_local g_insecure_rand_ctx 2018-12-17 10:37:09 -05:00
MarcoFalke b545a6e689
Merge #14964: test: Fix race in mempool_accept
faee59103d test: Fix race in mempool_accept (MarcoFalke)

Pull request description:

  If we happen to pick the same random coin to spend, there would be mempool conflicts in some runs of the test. Fix that by popping from a static list of coins to spend from.

Tree-SHA512: f6fd37e43d919371aa8bc3a2c93b569f9169961fe702f3641bb63180c3a88f12ca1857e9ed4d3723d5f04ca8ab5ef009a90e679580f36246a10b987620a55bee
2018-12-17 10:11:33 -05:00
Ben Carman 3019ba28d1 Making supported operating systems more clear 2018-12-17 06:12:05 -06:00
Wladimir J. van der Laan bfd7e54097
Merge #14979: [Qt] Restore < Qt5.6 compatibility for addAction
3e21b690d1 [Qt] Restore < Qt5.6 compatibility for addAction (Jonas Schnelli)

Pull request description:

  #14573 broke < Qt5.6 compatibility due to calling the lambda version of `addAction` that was added in Qt5.6.

  This PR re-enables < Qt5.6 compatibility.

Tree-SHA512: b3cf055d88a76713d100be05b2298d4091967e1a43de176af2647f59e76b98b216493dd12a6d68a942ae7946f2026e33dd8e8d20fc44a9a9614a3690ad9a2417
2018-12-17 12:52:37 +01:00
Chun Kuan Lee 5e5138a721 travis: Use trap and set -e errtrace 2018-12-17 09:24:37 +01:00
practicalswift 069752b726 build: Enable functional tests in the ThreadSanitizer (TSan) build job 2018-12-17 09:24:37 +01:00
Jonas Schnelli 3e21b690d1
[Qt] Restore < Qt5.6 compatibility for addAction 2018-12-16 20:24:43 -10:00
Hennadii Stepanov 4d454dcb64
Refactoring with QString::toNSString
The behavior of MacNotificationHandler::showNotification() has not been
changed.
2018-12-16 20:29:56 +02:00
Wladimir J. van der Laan 3424171685
Merge #14969: tests: Fix cuckoocache_tests TSAN failure introduced in 14935.
d98a29ec40 Fix cuckoocache_tests TSAN failure introduced in #14935. Fixes #14967. (practicalswift)

Pull request description:

  Fix cuckoocache_tests TSAN failure introduced in #14935. Fixes #14967.

Tree-SHA512: aabbfa3ab41d9f498151a9b50a2a875fd51ed609bb54d89292114f59392aae57c85fdd5b7a04b589fbf598aaf736b425a6f62b12c806a1fa23bdd45d2d2accfb
2018-12-16 12:14:28 +01:00
Jonas Schnelli dba0f4c5c7
Merge #14573: qt: Add Window menu
95a5a9fcc qt: Remove ellipsis from sending/receiving addresses (João Barbosa)
a96c0df35 qt: Add Window menu (João Barbosa)
9ea38d022 qt: Allow to inspect RPCConsole tabs (João Barbosa)

Pull request description:

  Overall this PR does the following:
   - add top level menu Window
   - add Minimize and Zoom actions to Window menu
   - move Sending/Receiving address to Window
   - remove Help->Debug window
   - add one menu entry for each debug window tab

  This removes the access to address book from the File menu.

  With wallet support:
  <img width="522" alt="screenshot 2018-12-11 at 00 33 05" src="https://user-images.githubusercontent.com/3534524/49770451-5bec0800-fcdc-11e8-91d6-f8f850ead92d.png">

  Without wallet support:
  <img width="593" alt="screenshot 2018-12-11 at 12 55 21" src="https://user-images.githubusercontent.com/3534524/49802183-19f6ac80-fd44-11e8-9973-36fcfb4f129e.png">

Tree-SHA512: 4fb03702efe18df7bae33950e462940162abe634c55d0214b8920812127b763234cc9b73f27b3702502a37b6d49bdd6c50b7c8d9a3daea75cecb0136556dd1ea
2018-12-15 20:13:38 -10:00
Stephan Oeste de7266fc3c
[net] add dnsseed.emzy.de to DNS seeds 2018-12-15 16:23:46 +01:00
practicalswift d98a29ec40 Fix cuckoocache_tests TSAN failure introduced in #14935. Fixes #14967. 2018-12-15 16:14:36 +01:00
1Il1 b74a52192b
fix testmempoolaccept CLI syntax
`testmempoolaccept "hexstring"` will give a "JSON parse error". The correct syntax is `testmempoolaccept \[\"hexstring\"\]` (but seems escaping is not displayed in other areas so leaving backspaces out).
2018-12-15 11:12:31 +09:00
MarcoFalke faee59103d
test: Fix race in mempool_accept 2018-12-14 18:12:17 -05:00
MarcoFalke fac4558462
sync: Add RecursiveMutex type alias 2018-12-14 16:26:13 -05:00
MarcoFalke 9133227298
Merge #14935: tests: Test for expected return values when calling functions returning a success code
c84c2b8c92 tests: Test for expected return values when calling functions returning a success code (practicalswift)

Pull request description:

  Test for expected return values when calling functions returning a success code (instead of discarding the return values).

  **Note to reviewers:** The following commands can be used to verify that the only text fragments added in this PR are `BOOST_CHECK(`, `!` and `)` :

  ```
  $ git diff HEAD~1 | grep -E '^[\-][^\-]' | cut -b2- > before.txt
  $ git diff HEAD~1 | grep -E '^[\+][^\+]' | cut -b2- > after.txt
  $ cat after.txt | sed 's/BOOST_CHECK(//g' | sed 's/));/);/g' | tr -d '!' > after-sed.txt
  $ diff -u before.txt after-sed.txt
  $
  ```

Tree-SHA512: ff0863ef2046a2eda3c44e9c6b9aedfe167881f2fa58db29fef859416831233ef6502a3a11fd2322bc1a924db83df8d4a5c5879298007f2a7b085e2a7286af70
2018-12-14 14:21:23 -05:00
MarcoFalke 6723d8e3a6
Merge #14931: test: mempool_persist: Verify prioritization is dumped correctly
fa30a0e7f7 test: mempool_persist: Verify prioritization is dumped correctly (MarcoFalke)

Pull request description:

Tree-SHA512: ef39c470cd418443741b55e9765ee84e0a87a44e7756f88dea86df9b4d37a121a4fbcb97976fbe4693692691650fb1196093b7dadd3922359eb4720845d28f05
2018-12-14 14:16:11 -05:00
MarcoFalke b53573e5c6
Merge #14951: Revert "tests: Support calling add_nodes more than once"
fa4b8c90d3 test: add_nodes can only be called once after set_test_params (MarcoFalke)
faa831102a Revert "tests: Support calling add_nodes more than once" (MarcoFalke)

Pull request description:

  Writing tests should be straightforward and with little side-effects as possible.

  I don't see how this is needed and can not be achieved with `self.num_nodes` (and `self.extra_args` et al.)

Tree-SHA512: 83a67f2cba9d97e21d80847ff405a4633fcb0d5674486efa57ee1813e46efe8709ae0fb462b8339a01ebeca5c4f2d29ecb1807d648b8fd9ee8ce336b08d580a8
2018-12-14 13:02:10 -05:00
João Barbosa bf4383277d rpc: Remove unused PreCommand signal 2018-12-14 15:54:50 +00:00
Luke Dashjr 57281199b8 lint/format-strings: Correctly exclude escaped percent symbols 2018-12-14 15:43:52 +00:00
MeshCollider 7a30e0f6c5
Merge #14821: Replace CAffectedKeysVisitor with descriptor based logic
0e75f44a0 Replace CAffectedKeysVisitor with descriptor based logic (Pieter Wuille)

Pull request description:

  It seems we don't need a custom visitor pattern anymore to find what keys are affected by a script. Instead, infer the descriptor, and see which keys it expands to.

Tree-SHA512: 8a52f61fb74e8ebfd8d02e759629e423ced6bd7d9a9ee7c4bdd2cca8465bc27b951cc69c8d835244a611ba55c6d22f83b81acef05487cb988c88c0951b797699
2018-12-14 14:21:29 +13:00
MarcoFalke a5aea9654f
Merge #14953: test: Make g_insecure_rand_ctx thread_local
faead93c6c test: Make g_insecure_rand_ctx thread_local (MarcoFalke)

Pull request description:

  Some tests might spin up several threads and `FastRandomContext` is not thread safe.

  Fix that by giving each thread their own randomness context (as opposed to e.g. making `FastRandomContext` thread safe or add locks elsewhere).

  Also, add the `g_` prefix to it (according to developer notes), since I am touching it anyway.

Tree-SHA512: c6b61375636dfbb2f8311efe8b47e9fe7c4f8bee9804871243f877545f3117cb6aa8556a2d9b1d1673e46e2e585b695a8ddd235b746b583c3eab962435efe2d1
2018-12-13 16:44:36 -05:00
MarcoFalke fa4b8c90d3
test: add_nodes can only be called once after set_test_params 2018-12-13 15:08:38 -05:00
MarcoFalke faead93c6c
test: Make g_insecure_rand_ctx thread_local 2018-12-13 14:32:44 -05:00
MarcoFalke 9a43344430
Merge #14947: scripts: Remove Python 2 import workarounds
4de11a3682 Remove Python 2 import workarounds (practicalswift)

Pull request description:

  Remove Python 2 import workarounds.

  As noted by @jnewbery in https://github.com/bitcoin/bitcoin/pull/14903#discussion_r241396925:

  > This exception handling is a vestige from when github-merge.py supported Python 2 and Python 3. We only support Python 3 now so we should be able to remove it entirely and just import from urllib.request.

Tree-SHA512: e0d21e6299dd62fb669ad95cbd3d19f7c803195fd336621aac72fd10ddc7431d90443831072a2e1eb2fc880d1d88eb7c3e2ead3da59f545f6db07d349af98fb3
2018-12-13 12:35:22 -05:00
MarcoFalke faa831102a
Revert "tests: Support calling add_nodes more than once"
This reverts commit 98a1846b00.
2018-12-13 12:06:38 -05:00
MarcoFalke d88d1f8c2f
Merge #14937: travis: fix travis would always be green even if it fail
fc91c1f28e Revert "travis: Save cache on build error" (Chun Kuan Lee)

Pull request description:

  The current travis-ci job would fail only if the last command failed. It would be succeed if other commands than the last one fail.

  This PR execute the script in another shell instance, so we should export those variables and bash functions. It would return 1 if the script fail no matter if it's the last command.

  Sorry for ruin the travis ci system in #14231

  Test: https://travis-ci.org/ken2812221/bitcoin/jobs/467086010

Tree-SHA512: 4d9d144fe4c7038b4eff6bf8496e821af603d81677142c0884ed52aea6ce3a50150669be4fdad72a5d372456a33a2452d75ec35e8a7ec2bc4bdfbeaeb93e9acb
2018-12-13 12:00:43 -05:00
practicalswift 4de11a3682 Remove Python 2 import workarounds 2018-12-13 16:46:31 +01:00
luciana 82687b5034
docs: add NSIS setup/install steps to windows docs 2018-12-13 22:52:17 +08:00
Wladimir J. van der Laan 914faf1784
Merge #14805: tests: Support calling add_nodes more than once
98a1846b00 tests: Support calling add_nodes more than once (Steven Roose)

Pull request description:

  Ran into this while writing [a multi-chain test for Elements](https://github.com/ElementsProject/elements/pull/458) where I call this method more than once.

Tree-SHA512: f2d698fcb560552aa5d81a4c3fbf40b7269b228b34d85a118291649ef83f8c0a30cd82a28d418237b55893bcecd538046b704e64a4d8a41f2c0aef8033dc83e5
2018-12-13 15:04:47 +01:00