diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-08-28 11:57:38 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-08-28 11:58:19 +0200 |
commit | 5f71eac6345c716b4e0b7506fd77ca0d119341d2 (patch) | |
tree | 142a976f1ff1e11805aa70a3857ffa53c20cbdad | |
parent | 3e4829af097b12f4255e9b04fa27c408850a783f (diff) | |
parent | cf3d7f94c2efd15a9cb910ccee31505934d55641 (diff) | |
download | bitcoin-5f71eac6345c716b4e0b7506fd77ca0d119341d2.tar.xz |
Merge #14084: [0.17] qa: Backports
cf3d7f94c2efd15a9cb910ccee31505934d55641 Use assert when running from multithreaded code as BOOST_CHECK_* are not thread safe (Jesse Cohen)
fab0fbefcf51f38aa858423017b545df6d098311 qa: Stop txindex thread before calling destructor (MarcoFalke)
b5ec6d4bf8a8ca18ca520e2f484e3ddd2d1138a3 Docs: Fix help message typo optiona -> optional (Ben Woosley)
Pull request description:
Fixes to make the unit tests and bench pass with the thread sanitizer (beside the issue with fChecked https://github.com/bitcoin/bitcoin/issues/14058#issuecomment-416042917).
For testing: `./configure --with-sanitizers=undefined,thread && make -j 16 && ./src/test/test_bitcoin`
Tree-SHA512: 5cb85ecc278b719dba03240265e93424ed1a28671834da7590adab88c2d43c6e6cbf3269bbe2fd79e5ed3a85ec77a268e05301e7a7421cf6a97d413dddac6327
-rw-r--r-- | src/test/scheduler_tests.cpp | 4 | ||||
-rw-r--r-- | src/test/txindex_tests.cpp | 2 | ||||
-rw-r--r-- | src/wallet/rpcwallet.cpp | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/test/scheduler_tests.cpp b/src/test/scheduler_tests.cpp index 001d8eb64b..2af0ab22da 100644 --- a/src/test/scheduler_tests.cpp +++ b/src/test/scheduler_tests.cpp @@ -138,11 +138,11 @@ BOOST_AUTO_TEST_CASE(singlethreadedscheduler_ordered) // the callbacks should run in exactly the order in which they were enqueued for (int i = 0; i < 100; ++i) { queue1.AddToProcessQueue([i, &counter1]() { - BOOST_CHECK_EQUAL(i, counter1++); + assert(i == counter1++); }); queue2.AddToProcessQueue([i, &counter2]() { - BOOST_CHECK_EQUAL(i, counter2++); + assert(i == counter2++); }); } diff --git a/src/test/txindex_tests.cpp b/src/test/txindex_tests.cpp index be7ee2428b..2a160b9988 100644 --- a/src/test/txindex_tests.cpp +++ b/src/test/txindex_tests.cpp @@ -61,6 +61,8 @@ BOOST_FIXTURE_TEST_CASE(txindex_initial_sync, TestChain100Setup) BOOST_ERROR("Read incorrect tx"); } } + + txindex.Stop(); // Stop thread before calling destructor } BOOST_AUTO_TEST_SUITE_END() diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index bce19cfeb3..cc6716d80d 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4596,7 +4596,7 @@ UniValue walletprocesspsbt(const JSONRPCRequest& request) " \"ALL|ANYONECANPAY\"\n" " \"NONE|ANYONECANPAY\"\n" " \"SINGLE|ANYONECANPAY\"\n" - "4. bip32derivs (boolean, optiona, default=false) If true, includes the BIP 32 derivation paths for public keys if we know them\n" + "4. bip32derivs (boolean, optional, default=false) If true, includes the BIP 32 derivation paths for public keys if we know them\n" "\nResult:\n" "{\n" @@ -4698,7 +4698,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request) " \"ECONOMICAL\"\n" " \"CONSERVATIVE\"\n" " }\n" - "5. bip32derivs (boolean, optiona, default=false) If true, includes the BIP 32 derivation paths for public keys if we know them\n" + "5. bip32derivs (boolean, optional, default=false) If true, includes the BIP 32 derivation paths for public keys if we know them\n" "\nResult:\n" "{\n" " \"psbt\": \"value\", (string) The resulting raw transaction (base64-encoded string)\n" |