aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-10Merge #11469: fix typo in comment of chain.cppWladimir J. van der Laan
f902e40 fix typo in comment of chain.cpp (Johannes Kanig) Pull request description: Tree-SHA512: 1af049bd75f244febc2c249f7b743b481ed6ce935f1f5265881f57064d69e0f055b9334dae765132348125a5e688f99b07a255de7deacf37ac57d1e6966b5e4b
2017-10-09Merge #11460: [depends] mac_alias 2.0.6, ds_store 1.1.2Jonas Schnelli
f617d1b06 [depends] native_ds_store 1.1.2 (fanquake) 46b752ab5 [depends] native_mac_alias 2.0.6 (fanquake) Pull request description: mac_alias and ds_store have moved from Bitbucket to GitHub. See https://github.com/al45tair/mac_alias and https://github.com/al45tair/ds_store. mac_alias has been updated to be compatible with Python 3? ~~~so we should be able to drop our patch.~~~ I've dropped some of the patch for now. Quickly tested on macOS, because depends building is broken with latest the Xcode see #11461. Related #8134. Tree-SHA512: d0017883f86b29bc4ab03bade5aaad9959e4343cd66596805fae48a1804e4bd150c77652f08e3e6cfafb3193f7c0183686f1f60c83f3a4204d40f76041c13ed2
2017-10-09Merge #10853: [tests] Fix RPC failure testing (again)MarcoFalke
47ba8cf71 scripted-diff: rename assert_raises_jsonrpc to assert_raises_rpc error (John Newbery) 677d893ff [tests] do not allow assert_raises_message to be called with JSONRPCException (John Newbery) 5864e9c16 [tests] remove direct testing on JSONRPCException from individual test cases (John Newbery) Pull request description: I did this a few months ago (here: #9707), but a few new examples have crept back in. When testing RPC failures, the test case should always assert the error value and message, to ensure that the failure was for the correct reason. Not doing that can hide bugs in the test code and mean that the test is not testing the correct behaviour. RPC failure testing should use the utility function `assert_raises_jsonrpc()` (renamed in the final commit of this PR to `assert_raises_rpc_error()`. This PR does the following: - changes all remaining instances of tests directly testing on `JSONRPCException` to calls to `assert_raises_jsonrpc()` - prevents `assert_raises_message()` from being called with `JSONRPCException` - scripted-diff changes `assert_raises_jsonrpc()` to `assert_raises_rpc_error()` Tree-SHA512: 2cc5e320704ec623a6e5a27d3c2c81cea86b502e29896f03bb5bf92cc36725132c1144410aecdf49e90d4577d512ee467d50d8184e9d5c5d0870bfc931316a5a
2017-10-09fix typo in comment of chain.cppJohannes Kanig
2017-10-09Merge #11465: rpc: Update named args documentation for importprivkeyMarcoFalke
aa57590d7 Update importprivkey named args documentation (Dusty Williams) Pull request description: Addresses issue #11462 by updating the documentation for the importprivkey arguments to the correct names, and updates the functional test importprunedfunds.py to use named arguments when calling importprivkey. Tree-SHA512: 64e14bf89c8c6eec9c37f6ec0c9fc0012fdb035d9ec32cd652110c75abaa922ec5c7523d6ec5098c8a7b42124159b5e330e070974eb79b8b92816f8d61074523
2017-10-09Merge #11367: [rpc] getblockchaininfo: add size_on_disk, prune_target_sizeWladimir J. van der Laan
b7dfc6c [rpc] getblockchaininfo: add size_on_disk, prune_target_size, automatic_pruning (Daniel Edgecumbe) Pull request description: Tree-SHA512: c255c27d6c922434d203ffdefda0dd3dddbd765b6a9cce5f80f5af5cb0b1c11c8aff6f4d00e96a326701d0bc81aace2f216fd1985675aa979f76c16f564a6cf6
2017-10-09Merge #10961: Improve readability of DecodeBase58Check(...)Wladimir J. van der Laan
c6a995e Improve readability of DecodeBase58Check(...) (practicalswift) Pull request description: Use the more readable form ... ```c++ &vchRet[vchRet.size() - 4] ``` ... instead of ... ```c++ &v.end()[-n] ``` Has the added benefit of eliminating a spurious static analyzer warning about improper use of negative values. Tree-SHA512: 5895310c189e9322082c28f34342ff9a6c238e2cae3f204521111c8a7981bc555af60b42de082c91608c1125dfc244a65c4faf929249a067a51435e2be74cb39
2017-10-09Merge #11448: [gui] reset addrProxy/addrSeparateProxyTor if colon char missingWladimir J. van der Laan
ce2418f [gui] reset addrProxy/addrSeparateProxyTor if colon char missing (Cristian Mircea Messel) Pull request description: If addrProxy or addrSeparateProxyTor do not have a colon in the string somewhere in the QSettings storage, then attempting to open the options dialog will cause the entire program to crash. Fixes #11209 Tree-SHA512: 2d9e6987cf05af3f41033290b61d00920f7fe4a65bea7efd96ed417a8ca7866d248f091e09947cc8aad3a6a4aa8b7777211cfff7f379a62188be50df2c46d4b2
2017-10-09Update importprivkey named args documentationDusty Williams
Fixes #11462. Updated documentation for importprivkey function to use the correct name for the first argument. Also updates a call to importprivkey to use named args in functional test.
2017-10-07[depends] native_ds_store 1.1.2fanquake
2017-10-07[depends] native_mac_alias 2.0.6fanquake
2017-10-05Merge #9572: Skip witness sighash cache for non-segwit transactionsWladimir J. van der Laan
0da49b5 Skip precompute sighash for transactions without witness (Johnson Lau) Pull request description: This saves unnecessary hash caching for non-segwit transactions, but I am not sure if the difference is noticeable. Tree-SHA512: 5cd733a729a52a45781510b3572b26e76837a94155caa14311c6d23a27a12e9613ff278dfc2592e21f640202782f22c5ad00fca85c4de5efacaa617c48ccb08d
2017-10-05Merge #10440: [tests] Add libFuzzer supportWladimir J. van der Laan
f3ba869 [tests] Add libFuzzer support. (practicalswift) Pull request description: Add `libFuzzer` support. As discussed in [issue #10364](https://github.com/bitcoin/bitcoin/issues/10364#issuecomment-300000902). See http://llvm.org/docs/LibFuzzer.html#fuzzer-usage for usage instructions. Tree-SHA512: 32562a3a43eb07e79989d55eeb0bfe94e2cff060da8ff0cb50c2f838ef19f2fd583a3dc89074a6442bd3e395185d309371325ed9a0ef50065431d5ea7f099772
2017-10-05Merge #11437: [Docs] Update Windows build instructions for using WSL and ↵Wladimir J. van der Laan
Ubuntu 17.04 696ce46 [Docs] Update Windows build instructions for using WSL and Ubuntu 17.04 (fanquake) 4f890ba Add new step to clean $PATH var by removing /mnt specific Window's %PATH% paths that cause issues with the make system (Donal OConnor) Pull request description: This updates the Windows build documentation with the workaround required to build using Ubuntu 17.04 on WSL, and makes it's explicit that building on Ubuntu 16.04 is broken, and not recommended. This includes a commit from @donaloconnor in #11244, and is mostly the investigative work of @laanwj throughout #8732, #8653 and quite a few other issues. I tested building on 14.04, 16.04.3 and 17.04 [here](https://github.com/bitcoin/bitcoin/pull/11244#issuecomment-327990251) and got the results we expect. --- Built master at https://github.com/bitcoin/bitcoin/commit/c22a53cd6351b3f0e96de971b001ad712b83fc47 on a Windows 10 VM (Version 1607, OS Build 14393.1593) using WSL with Ubuntu 14.04. ![windows](https://user-images.githubusercontent.com/863730/30195033-867f1f24-9489-11e7-932c-e87b8764a627.png) Upgraded WSL to 16.04.3, and tried building https://github.com/bitcoin/bitcoin/commit/c22a53cd6351b3f0e96de971b001ad712b83fc47 using these instructions. The result is as expected. ![ubuntu 16 04 3](https://user-images.githubusercontent.com/863730/30235670-b9bf36bc-953d-11e7-8c1d-4debf7113032.png) Upgraded WSL to 17.04 and tried building https://github.com/bitcoin/bitcoin/commit/3255d6347b1f9eccbec3d6d93d4a424087a3b35b using these instructions. ![ubuntu 17 04](https://user-images.githubusercontent.com/863730/30235669-b7473434-953d-11e7-8ea3-d05a319ae2d4.png) If someone else could also verify that builds are working on both 14.04 and 17.04 with these instructions, that would be great. Tree-SHA512: 866f1003eb45d208d8ae849504f54fc2f27c32240129d2124ce5a2ee7167bcbf062d29f23b1745123f532ffd0253a8611e719b2a316d1331d3c3924f91e7775d
2017-10-05scripted-diff: rename assert_raises_jsonrpc to assert_raises_rpc errorJohn Newbery
-BEGIN VERIFY SCRIPT- sed -i 's/assert_raises_jsonrpc/assert_raises_rpc_error/g' test/functional/*py test/functional/test_framework/*py -END VERIFY SCRIPT-
2017-10-05[tests] do not allow assert_raises_message to be called with JSONRPCExceptionJohn Newbery
2017-10-05[tests] remove direct testing on JSONRPCException from individual test casesJohn Newbery
2017-10-05Merge #11107: Fix races in AppInitMain and others with lock and atomic boolsMarcoFalke
c626dcb50 Make fUseCrypto atomic (MeshCollider) 731065b11 Consistent parameter names in txdb.h (MeshCollider) 35aeabec6 Make fReindex atomic to avoid race (MeshCollider) 58d91af59 Fix race for mapBlockIndex in AppInitMain (MeshCollider) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/11106 Also makes fReindex atomic as suggested in @TheBlueMatt comment below, and makes fUseCrypto atomic as suggested in 10916 https://github.com/bitcoin/bitcoin/pull/11107/commits/d291e7635b0ef4156c2805c6c4ee1adad91f0307 just renames the parameters in the txdb header file to make them consistent with those used in the cpp file, noticed it when looking for uses of fReindex Tree-SHA512: b378aa7289fd505b76565cd4d48dcdc04ac5540283ea1c80442170b0f13cb6df771b1a94dd54b7fec3478a7b4668c224ec9d795f16937782724c5d020edd3a42
2017-10-04Merge #11435: build: Make "make clean" remove all files created when running ↵Wladimir J. van der Laan
"make check" f35d033 build: Make "make clean" remove all files created when running "make check" (practicalswift) Pull request description: Make `make clean` remove all files created when running `make check`. More specifically: remove also `obj/build.h` and `bench/data/block413567.raw.h` as part of `make clean`. Before this patch: ```bash $ git clone https://github.com/bitcoin/bitcoin.git $ cd bitcoin/ $ ./autogen.sh $ ./configure $ cp -r ../bitcoin ../bitcoin-before-make $ make check $ make clean $ cp -r ../bitcoin ../bitcoin-after-make-and-make-clean $ cd .. $ diff -rq bitcoin-before-make/ bitcoin-after-make-and-make-clean/ | grep -E "^Only in bitcoin-after-make-and-make-clean/" | grep -v dirstamp Only in bitcoin-after-make-and-make-clean/src/bench/data: block413567.raw.h Only in bitcoin-after-make-and-make-clean/src/obj: build.h $ ``` After this patch: ```bash $ git clone https://github.com/bitcoin/bitcoin.git $ cd bitcoin/ $ ./autogen.sh $ ./configure $ cp -r ../bitcoin ../bitcoin-before-make $ make check $ make clean $ cp -r ../bitcoin ../bitcoin-after-make-and-make-clean $ cd .. $ diff -rq bitcoin-before-make/ bitcoin-after-make-and-make-clean/ | grep -E "^Only in bitcoin-after-make-and-make-clean/" | grep -v dirstamp $ ``` Tree-SHA512: 953e8423485ffd415f0ade6abe0b4c407454f67c332140ef019d89db425bb4a831327b3f634b8d69b17325dcfc6e3ac72dc2ba1ce5462158eecc3c05645e93ba
2017-10-04Merge #11440: Fix validationinterface build on super old boost/clangWladimir J. van der Laan
96c2ce9 Fix validationinterface build on super old boost/clang (Matt Corallo) Pull request description: This should fix all the non-dependancy issues for termux builds. See Github issue #11388. Tree-SHA512: ff0918fa76a6d4639a6c5b5e045ef053ce1d93eb0b1fe94c5fdfcc4d5e54e1118eeb09676ffd8f6d1acd630a63656944c6274ee3dbd7c09b7129c30647dbf4f9
2017-10-04Merge #9937: rpc: Prevent `dumpwallet` from overwriting filesWladimir J. van der Laan
0cd9273 rpc: Prevent `dumpwallet` from overwriting files (Wladimir J. van der Laan) Pull request description: Prevent arbitrary files from being overwritten by `dumpwallet`. There have been reports that users have overwritten wallet files this way. It may also avoid other security issues. Fixes #9934. Adds mention to release notes and adds a test. Tree-SHA512: 268c98636d40924d793b55a685a0b419bafd834ad369edaec08227ebe26ed4470ddea73008d1c4beb10ea445db1b0bb8e3546ba8fc2d1a411ebd4a0de8ce9120
2017-10-04build: Make "make clean" remove all files created when running "make check"practicalswift
More specifically: remove also obj/build.h and bench/data/block413567.raw.h. Before this patch: ``` $ diff -rq bitcoin-before-make/ bitcoin-after-make-and-make-clean/ | grep -E "^Only in bitcoin-after-make-and-make-clean/" | grep -v dirstamp Only in bitcoin-after-make-and-make-clean/src/bench/data: block413567.raw.h Only in bitcoin-after-make-and-make-clean/src/obj: build.h $ ``` After this patch: ``` $ diff -rq bitcoin-before-make/ bitcoin-after-make-and-make-clean/ | grep -E "^Only in bitcoin-after-make-and-make-clean/" | grep -v dirstamp $ ```
2017-10-04Merge #10939: [init] Check non-emptiness of -blocknotify command prior to ↵Wladimir J. van der Laan
executing cffe85f Skip sys::system(...) call in case of empty command (practicalswift) 6fb8f5f Check that -blocknotify command is non-empty before executing (practicalswift) Pull request description: Check that `-blocknotify` command is non-empty before executing. To make the `BlockNotifyCallback(...)` (`-blocknotify`) behaviour consistent with that of: * `AlertNotify(...)` (`-alertnotify`) * `AddToWallet(...)` (`-walletnotify`) Tree-SHA512: 18272166793a5a8b9cc2a727bfbcea53d38c329a55bc975c02db601329d608a61c20e026ce4b616193ecd3810dca4d3e2cb3bf773898a51872008a8dba96763e
2017-10-04Merge #11406: Add state message print to AcceptBlock failure message.Wladimir J. van der Laan
6643b80 Add state message print to AcceptBlock failure message. (Matt Corallo) Pull request description: This should make it easier to debug issues where the CheckBlock at the top of ProcessNewBlock fails (which does not print, in contrast to AcceptBlock, which always prints). This was motivated by #11371 which appears to be exactly such a case, and is not debuggable from the information provided. Not sure how much this would have helped in that case, but it is kinda weird that we can reject a block without ever printing why. Tree-SHA512: 7a1c2c76080b810212da885c38e091609e409c62918cc326bb36a1096e09b2ae7e26fd4bdaefd79863d2894e2823e463005700a524940f177a59ef09f589b2f1
2017-10-04Merge #11443: [qa] Allow "make cov" out-of-tree; Fix rpc mapping checkWladimir J. van der Laan
fae60e3 qa: Fix lcov for out-of-tree builds (MarcoFalke) fae2673 qa: check-rpc-mapping must not run on empty lists (MarcoFalke) Pull request description: Random qa fixups: * `make cov` should work for out-of-tree builds * `check-rpc-mappings.py` should assert that it is actually checking something and the lists are not empty. Tree-SHA512: 2b66f69d6a1ae035c772f8ceb1d58dce904d98058330dad6ccb1421941e167aa748fe1c12126b87f43b0843f51fa85d89de079d586629fcaf8261c44a8dc6053
2017-10-04Merge #11421: Merge current secp256k1 subtreeMarcoFalke
fd86f998f Squashed 'src/secp256k1/' changes from 84973d393..0b7024185 (MarcoFalke) Pull request description: The subtree should now match upstream again. Check with: ```sh ./contrib/devtools/git-subtree-check.sh src/secp256k1 ``` The changes are only documentation/refactoring related. Tree-SHA512: 43e8a95bcbfefef9e19ec38a92d2d57fdd4a16ddf726e036d36a0d806eb6f35b45b40ee69f980430e107895ec8725b5de4e36456b026214675e0b19630bb6fe9
2017-10-03Merge #11419: Utils: Fix launchctl not being able to stop bitcoindJonas Schnelli
ab5bba778 Fix launchctl not being able to stop bitcoind (Alejandro Avilés) Pull request description: `bitcoind` should not be launched as daemon from the Launch Agent. Otherwise, the process cannot be stopped from `launchctl stop`/`launchctl unload`. To reproduce the issue: ```console $ launchctl load ~/Library/LaunchAgents/org.bitcoin.bitcoind.plist $ pgrep -fla bitcoin 60225 /usr/local/opt/bitcoin/bin/bitcoind $ launchctl unload ~/Library/LaunchAgents/org.bitcoin.bitcoind.plist ``` Wait a few seconds and then run `pgrep` again: ```console $ pgrep -fla bitcoin 60225 /usr/local/opt/bitcoin/bin/bitcoind ``` The node is still running. This happens because Launch Agent is not supposed to run programs as daemons, since the agent makes sure they run in the background. Running them as daemons makes the Launch Agent lose control of the process and, so, it cannot be stopped. Tree-SHA512: 5342e1a858e478a226a1db292f1b8f8666bb252ee951753b131902c325ea3d47592cf245298decb423ac658a3175761b54dc2e7df6feea5343d65ba255613f67
2017-10-04[gui] reset addrProxy/addrSeparateProxyTor if colon char missingCristian Mircea Messel
If addrProxy or addrSeparateProxyTor do not have a colon in the string somewhere in the QSettings storage, then attempting to open the options dialog will cause the entire program to crash.
2017-10-03Merge #11433: qa: Restore bitcoin-util-test py2 compatibilityMarcoFalke
fafff1220 qa: Restore bitcoin-util-test py2 compatibility (MarcoFalke) Pull request description: Currently `./configure && make check` will look for python3, then python2. As long as we support python2 (and use it as fallback), `make check` should run fine with both python2 and python3. Fixes #11352 by @Zenitur Tree-SHA512: a335ebdd224328d6f924fe52a9b97de196926476c9ee04ce3280743ea93bcae355eb2d5d4bed4050c01b2e904105595eac7db2eaa9307207581caa0a98ebcc0b
2017-10-03Merge #11293: Deduplicate CMerkleBlock construction code, add test coverageMarcoFalke
46ce223d1 Add tests for CMerkleBlock usage with txids specified (James O'Beirne) 5ab586f90 Consolidate CMerkleBlock constructor into a single method (James O'Beirne) Pull request description: What started as a simple task to add test coverage ended up giving way to a light refactoring. This consolidates the mostly-identical `CMerkleBlock` constructors into one (using C++11 constructor delegation) and adds coverage for the by-txids construction case. ### Before ![selection_006](https://user-images.githubusercontent.com/73197/30242104-0f381fe4-9545-11e7-9617-83b87fce0456.png) ### After ![selection_008](https://user-images.githubusercontent.com/73197/30242107-1425dfaa-9545-11e7-9e6b-2c3432517dd1.png) Tree-SHA512: eed84ed3e8bfc43473077b575c8252759a857e37275e4b36ca7cc2c17a65895e5f494bfd9d4aeab09fc6e98fc6a9c641ac7ecc0ddbeefe01a9e4308e7909e529
2017-10-03[Docs] Update Windows build instructions for using WSL and Ubuntu 17.04fanquake
2017-10-02Fix validationinterface build on super old boost/clangMatt Corallo
This should fix all the non-dependancy issues for termux builds. See Github issue #11388.
2017-10-02Merge #11407: [tests] add functional test for mempoolreplacement command ↵MarcoFalke
line arg 1088b5322 add functional test for mempoolreplacement command line arg (Gregory Sanders) Pull request description: Currently untested. Tree-SHA512: 2dd9d55a3499844e48b3774df9155fd650220b0761da45d16869570356bb0ed17a88d4efa4302a517dd96e1e9cb34113661b3c9df688736f6849201a3d544deb
2017-10-02Merge #11365: [Tests] Add Qt GUI tests to Overview and ReceiveCoin PageMarcoFalke
634e38ca7 [Tests] Add Qt GUI tests to Overview and ReceiveCoin Page (Anditto Heristyo) Pull request description: I've added some Qt wallet tests based on #9974, namely the input & buttons on ReceiveCoin. Tree-SHA512: f4223827145e35c2abee83a6ca777498bebcff3825fece10fbb1dbfd1f6bb017d3f2c0521662854b4407cdeee9c6a527269ab9cc28e0dc85c11b668155fcd195
2017-10-02Merge #11021: [rpc] fix getchaintxstats()Wladimir J. van der Laan
07704c1 Add some tests for getchaintxstats (Akio Nakamura) 3336676 Fix getchaintxstats() (Akio Nakamura) Pull request description: 1. calculate nblocks more adaptive. -> set default nblocks to min (blocks for 1 month, target block's height - 1) -> before PR: if not specify nblocks-parameter, illegal parameter error will happen when target block height is below nblocks. 2. correct error message. -> nblocks accepts [1 .. block's height -1] . so add a word "-1". 3. add check 0-divide. -> if nTimeDiff = 0 then use UniValue(UniValue::VNULL) and returns {... "txrate": null} . -> before PR: if nTimeDiff = 0 then returns {... "txrate":} and bitcoin-cli cannot handle the response. Tree-SHA512: e1962ce7bb05a5bc7dec03eb04a8e7578f50fdb68927fcfc0a2232905ef4d679293eee148ebe0866682d209a8c458d21fbe71715e7311adb81f37089aae1ed93
2017-10-02Merge #11411: script: Change SignatureHash input index check to an assert.Wladimir J. van der Laan
5ddf560 script: Change SignatureHash input index check to an assert. (Jim Posen) Pull request description: In the SignatureHash function, the input index must refer to a valid index. This is not enforced equally in the segwit/non-segwit branches and should be an assertion rather than returning a error hash. Tree-SHA512: a775fc9e9bd9835c0ab36368aa45ab3d53e38f31fd4d2b8684a77ee6028c854c363df038681a59358b30138957573ad63b71d4a722c16e0830fb4fa72669ef39
2017-10-02Merge #11193: [Qt] Terminate string *pszExePath after readlink and without ↵Wladimir J. van der Laan
using memset 3a4401a [Qt] Terminate string *pszExePath after readlink and without using memset (practicalswift) Pull request description: Terminate string `*pszExePath` after `readlink` and before passing to operator `<<`. * `ssize_t readlink(const char *pathname, char *buf, size_t bufsiz)` does not append a null byte to `buf`. * Operator `<<` expects a null-terminated string. Tree-SHA512: fc18844bb23059fead8db0cb9b4b4ba6188f58e3f19ab4719c2737cc5dd6df23ae7d4804ef2820d39b334204a48ee3de1d202c272bcd156e60761af2fcb9349d
2017-10-02Merge #11432: Remove unused fTry from push_lockWladimir J. van der Laan
92848e5 Remove unused fTry from push_lock (João Barbosa) Pull request description: After #9674 (618ee92) the `fTry` argument in `push_lock` is no longer needed. Tree-SHA512: a461f2ca9e590a9dfcc7814d9852d85f03712cb4735176b8b2db0e8dc731597c2a515650998ca7d53cf5a0c48b408a974a0704897036c6ed74788fc24c5e73ae
2017-10-02Merge #11399: Fix bip68-sequence rpc testWladimir J. van der Laan
49f869f Fix bip68-sequence rpc test (Johnson Lau) Pull request description: The test mined 1 extra block for the ACTIVE state. Test added to catch the right moment of LOCKED_IN->ACTIVE transaction Tree-SHA512: a42477cf0b137e7e3b7c6c7b2530101cfad4e4f59866170b8fc0d655c43b3144aad6bca4287a4a8df4c28d7cf08d3f8df166975ad2e8dcb7d2cc15de60cf11cd
2017-10-02Merge #11284: Fix invalid memory access in CScript::operator+= ↵Wladimir J. van der Laan
(guidovranken, ajtowns) d601f16 Fix invalid memory access in CScript::operator+= (Anthony Towns) Pull request description: This is a fix for #11114 -- invoking "s += s" gets turned into "s.insert(s.end(), s.begin(), s.end())" which can result in an invalid memory access is s.capacity() < 2*s.size() (because s gets resized and possibly moved, so s.begin() and s.end() become invalid references when reading the values to be appended). The fix is straightforward: reserve enough space in advance, so that insert() doesn't need to resize and thus its arguments remain valid. A simple test case is added as well; though you probably need to run it via valgrind to actually catch the problem when it's not fixed... Tree-SHA512: 4720d0c17463fdc43b344c45fe603423d20b30d48da1b9d85eeedc505d7f34db1ed5495ef1556459ae962a94717e3c6e8fc441763771901efea210d01322b7ef
2017-10-02Merge #11422: qa: Verify DBWrapper iterators are taking snapshotsWladimir J. van der Laan
bb8376b Verify DBWrapper iterators are taking snapshots (Matt Corallo) Pull request description: The LevelDB docs seem to indicate that an iterator will not take snapshots (even providing instructions on how to do so yourself). In several of the places we use them, we assume snapshots to have been taken. In order to make sure LevelDB doesn't change out from under us (and to prevent the next person who reads the docs from having the same fright I did), verify that snapshots are taken in our tests. Tree-SHA512: 54f24dabc294962e9c20882f61809604421a661208d1568bb107102248603e8e7c12e929ccb0812a73d4e4f23fea61f1b48e7cc24da5a7260f1d14d89ba88cd6
2017-10-02qa: Fix lcov for out-of-tree buildsMarcoFalke
2017-10-02Add new step to clean $PATH var by removing /mnt specific Window's %PATH% ↵Donal OConnor
paths that cause issues with the make system
2017-10-01qa: check-rpc-mapping must not run on empty listsMarcoFalke
2017-10-01qa: Restore bitcoin-util-test py2 compatibilityMarcoFalke
2017-09-30Remove unused fTry from push_lockJoão Barbosa
2017-09-30Verify DBWrapper iterators are taking snapshotsMatt Corallo
The LevelDB docs seem to indicate that an iterator will not take snapshots (even providing instructions on how to do so yourself). In several of the places we use them, we assume snapshots to have been taken. In order to make sure LevelDB doesn't change out from under us (and to prevent the next person who reads the docs from having the same fright I did), verify that snapshots are taken in our tests.
2017-09-30Merge #11303: Fix estimatesmartfee rounding display issueMarcoFalke
1789e4675 Force explicit double -> int conversion for CFeeRate constructor (Matt Corallo) 53a6590f4 Make float <-> int casts explicit outside of test, qt, CFeeRate (Matt Corallo) 0b1b9148c Remove countMaskInv caching in bench framework (Matt Corallo) Pull request description: This fixes an issue where estimatesmartfee which matches at the min relay fee will return 999 sat/byte instead of 1000 sat/byte due to a float rounding issue. I went ahead and made all float <-> int conversion outside of test/qt explicit (test only had one or two more, Qt had quite a few, including many in the Qt headers themselves) and added overloads to CFeeRate to force callers to do an explicit round themselves. Easy to test with -Wfloat-conversion. Tree-SHA512: 66087b08e5dfca67506da54ae057c2f9d86184415e8fa4fa0199e38839e06a3ce96c836fcb7593b7d960065f5240c594ff3a0cfa14333ac528421f5aeac835c9
2017-09-30Merge #11391: Remove lxcbr0 lines from gitian-build.shMarcoFalke
884913041 Remove lxcbr0 lines from gitian-build.sh (MeshCollider) Pull request description: The `gitian-build.sh` script crashes with an error when I tried to use it, @kallewoof also had this same issue: lxcbr0: ERROR while getting interface flags: No such device SIOCSIFADDR: No such device lxcbr0: ERROR while getting interface flags: No such device And then: lxc-execute: failed to find gateway addresses lxc-execute: failed to spawn 'gitian' ./bin/gbuild:21:in `system!': failed to run make-clean-vm --suite trusty --arch amd64 (RuntimeError) I believe it's because of the two lines which this PR removes, I tested it and seems to work as expected now. These lines are unique to this script and aren't mentioned in `gitian-building.md` or `release-process.md`. We discussed it on IRC, @achow101 agrees removing these lines would probably fix it: https://botbot.me/freenode/bitcoin-core-dev/2017-09-19/?msg=91299782&page=2 Has anyone successfully used this script as-is? Or does everyone else manually run the builds/write their own script like I have up til this point? Tree-SHA512: 0cffd3df307ad107fb1d4bae45094fc5002b56c2fe64f03642d968659fdc62f586ba249dbc540b69058b276f2456962e5bc4d665cab21ef1f561735eb78afcc2
2017-09-29Merge #11418: Add error string for CLEANSTACK script violationPieter Wuille
cee28fbc3 Add error string for CLEANSTACK script violation, preventing an "unknown error" if the CLEANSTACK error condition is set. (Mark Friedenbach) Pull request description: This prevents an unhelpful "unknown error" from being printed in test logs if the CLEANSTACK error condition is set. Tree-SHA512: cd6764e930184aef3d662e40c67f2ea8aea8552a26d33a567d0315a19d707a82aa2afad9f48ecbb731aa5b77fbbfbd7a6a3a989fdb1424a1181350052ff2a9b5