Merge #14084: [0.17] qa: Backports

cf3d7f94c2 Use assert when running from multithreaded code as BOOST_CHECK_* are not thread safe (Jesse Cohen)
fab0fbefcf qa: Stop txindex thread before calling destructor (MarcoFalke)
b5ec6d4bf8 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
This commit is contained in:
Wladimir J. van der Laan 2018-08-28 11:57:38 +02:00
commit 5f71eac634
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D
3 changed files with 6 additions and 4 deletions

View file

@ -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++);
});
}

View file

@ -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()

View file

@ -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"