aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-20Add script dump note to RPC help text and release notesMeshCollider
2017-12-20Add test for importwalletMeshCollider
2017-12-20Add dumpwallet scripts testMeshCollider
2017-12-20Add scripts to importwallet RPCMeshCollider
2017-12-20Add CScripts to dumpwallet RPCMeshCollider
2017-12-20Add GetCScripts to CBasicKeyStoreMeshCollider
2017-12-19Merge #11867: Improve node network testMarcoFalke
ee5efad6cf [tests] refactor node_network_limited (John Newbery) b425131f5a [tests] remove redundant duplicate tests from node_network_limited (John Newbery) 2e02984591 [tests] node_network_limited - remove race condition (John Newbery) dbfe294805 [tests] define NODE_NETWORK_LIMITED in test framework (John Newbery) 1285312048 [tests] fix flake8 warnings in node_network_limited.py (John Newbery) Pull request description: Fixes race condition in the node_network_limited test case introduced in #11740. Also tidies up the test and removes redundant duplicate tests. Tree-SHA512: a5240fe35509d81a47c3d3b141a956378675926093e658d24be43027b20d3b5f0ba7c6017c8208487a1849d4fdfb911a361911d571423db7c50711250aba3011
2017-12-19[tests] refactor node_network_limitedJohn Newbery
2017-12-19[tests] remove redundant duplicate tests from node_network_limitedJohn Newbery
2017-12-19[tests] node_network_limited - remove race conditionJohn Newbery
node_network_limited had a race condition, since wait_for_block() doesn't do what you might expect. It only checks the most recent block received over the P2P interface (perhaps we should rename the method wait_for_most_recent_block() to avoid future confusion). The test can fail if the node sends us invs for other blocks, we respond with a getdata, and the node sends us one of those blocks in the 0.05 second wait_until loop window. Fix this by not responding to inv messages with getdata messages.
2017-12-19[tests] define NODE_NETWORK_LIMITED in test frameworkJohn Newbery
2017-12-19[tests] fix flake8 warnings in node_network_limited.pyJohn Newbery
2017-12-19Merge #11273: Ignore old format estimation fileWladimir J. van der Laan
3a3a9f9 Ignore old format estimation file (Murch) Pull request description: The fee estimation data format changed from 0.14.x to 0.15.0, so we should no longer read the old data. H/T @jnewbery, @morcos Pending testing. Tree-SHA512: c8e3824dbdd8f6730133d5ad20b00995e9a63ab54431158a91e2f4d2aba5763b8aa698bce1fffca2713ba3a162e23d8fcd6e3efb9847b015c2e1e8725398150b
2017-12-19Merge #11923: Wallet : remove unused fNoncriticalErrors variable from ↵Wladimir J. van der Laan
CWalletDB::FindWalletTx ecf9b25 remove unused fNoncriticalErrors variable from CWalletDB::FindWalletTx (Pierre Rochard) Pull request description: The `CWalletDB::FindWalletTx` method was patterned after `CWalletDB::LoadWallet`, where `fNoncriticalErrors` is used when a tx check fails in `ReadKeyValue`. Since `FindWalletTx` is only used by methods which are zapping txs, it makes sense that `ReadKeyValue` is not called and the tx is not checked, so I think that deleting the unused `fNoncriticalErrors` boolean variable and its conditional statement is appropriate. Tree-SHA512: 0976eae97522719fdaeca1fb3f4a080561e46c06d0b8dc75e14262c6bc242998db3f7057183a230a1d7e4ac5fc348e9059f545b7d718ebbcdf6dcdfc63bcc286
2017-12-19Merge #11946: tests: Remove unused variable (firstAddrnServices)MarcoFalke
bdaed47558 tests: Remove unused variable (firstAddrnServices) (practicalswift) Pull request description: Remove unused variable (`firstAddrnServices`). Tree-SHA512: 7075952b392227c00fcb22adb1fd3f7ef31d7fd7101fbeff632beeea814c70beaef5c9957736eff2451976c8b43b950fc949642e608b610c5fefd150282eafb0
2017-12-19Merge #11947: test: Fix rawtransactions testMarcoFalke
4508519250 test: Fix rawtransactions test (Wladimir J. van der Laan) Pull request description: Looks like another `assert_raises_jsonrpc` snuck in with #11178. Change it to `assert_raises_rpc_error`. Tree-SHA512: c2c2fb78be5dcc490981896cf60be1fba0b41c385a4f18de084b2e0a042c5b06bf6da617d3bf3b7e585b728554f5c8e1814b85045ba542cca9dfb7b826fda75a
2017-12-19test: Fix rawtransactions testWladimir J. van der Laan
Looks like another `assert_raises_jsonrpc` snuck in with #11178. Change it to `assert_raises_rpc_error`.
2017-12-19tests: Remove unused variable (firstAddrnServices)practicalswift
2017-12-19Merge #11220: Check specific validation error in miner testsWladimir J. van der Laan
12781db [Tests] check specific validation error in miner tests (Sjors Provoost) Pull request description: ## Problem `BOOST_CHECK_THROW` merely checks that some `std::runtime_error` is thrown, but not which one. Here's an example of how this can cause a test to pass when a developer introduces a consensus bug. The test for the sigops limit assumes that `CreateNewBlock` fails with `bad-blk-sigops`. However it can also fail with bad-txns-vout-negative, if a naive developer lowers `BLOCKSUBSIDY` to `1*COIN`. ## Solution `BOOST_CHECK_EXCEPTION` allows an additional predicate function. This commit uses this for all exceptions that are checked for in `miner_tets.cpp`: * `bad-blk-sigops` * `bad-cb-multiple` * `bad-txns-inputs-missingorspent` * `block-validation-failed` If the function throws a different error, the test will fail. Although the message produced by Boost is a bit [confusing](http://boost.2283326.n4.nabble.com/Test-BOOST-CHECK-EXCEPTION-error-message-still-vague-tt4683257.html#a4683554), it does show which error was actually thrown. Here's what the above `1*COIN` bug would result in: <img width="1134" alt="schermafbeelding 2017-09-02 om 23 42 29" src="https://user-images.githubusercontent.com/10217/29998976-815cabce-9038-11e7-9c46-f5f6cfb0ca7d.png"> ## Other considerations A more elegant solution in my opinion would be to subclass `std::runtime_error` for each `INVALID_TRANSACTION` type, but this would involve touching consensus code. I put the predicates in `test_bitcoin.h` because I assume they can be reused in other test files. However [serialize_tests.cpp](https://github.com/bitcoin/bitcoin/blob/v0.15.0rc3/src/test/serialize_tests.cpp#L245) also uses `BOOST_CHECK_EXCEPTION` and it defines the predicate in the test file itself. Instead of four `IsRejectInvalidReasonX(std::runtime_error const& e)` functions, I'd prefer something reusable like `bool IsRejectInvalidReason(String reason)(std::runtime_error const& e)`, which would be used like `BOOST_CHECK_EXCEPTION(functionThatThrows(), std::runtime_error, IsRejectInvalidReason("bad-blk-sigops")`. I couldn't figure out how to do that in C++. Tree-SHA512: e364f19b4ac19f910f6e8d6533357f57ccddcbd9d53dcfaf923d424d2b9711446d6f36da193208b35788ca21863eadaa7becd9ad890334d334bccf8c2e63dee1
2017-12-19Merge #11943: contrib: fix typo in install_db4.sh help messageWladimir J. van der Laan
ce552b6 contrib: fix typo in install_db4.sh help message (Wladimir J. van der Laan) Pull request description: It installs db4, not db5. Tree-SHA512: c503819bd46da1fc5bd386fbf7cab1702ed8a9f0532a5f9e81f8737dfc1c7883eddf54d7de78418f327e60627ed344f94b1c2819101971e0f170b2c4c0ba4efe
2017-12-19contrib: fix typo in install_db4.sh help messageWladimir J. van der Laan
It installs db4, not db5.
2017-12-19Merge #11178: Add iswitness parameter to decode- and fundrawtransaction RPCsWladimir J. van der Laan
6f39ac0 Add test for decoderawtransaction bool (MeshCollider) bbdbe80 Add iswitness parameter to decode- and fundrawtransaction RPCs (MeshCollider) Pull request description: Suggested in https://github.com/bitcoin/bitcoin/pull/10481#issuecomment-325244946, this adds the option to explicitly choose whether a serialized transaction should be decoded as a witness or non-witness transaction rather than relying on the heuristic checks in #10481. The parameter defaults to relying on #10481 if not included, but it overrides that if included. Tree-SHA512: d4846a5bb7d64dc19c516445488b00af329fc1f4181d9dfdf9f2382a086568edc98250a4ac7594e24a1bc231dfdee53c699b12c8380c355b920a67cc6770b7a9
2017-12-19Merge #11936: [build] Warn that only libconsensus can be built without BoostWladimir J. van der Laan
3eb4d45 [build] Warn that only libconsensus can be built without boost (Varunram) Pull request description: This replaces the "configure: error: Could not find a version of the boost_system library!" message you receive when trying to build without Boost, with "only libbitcoinconsensus can be built without boost". `./configure --with-utils=no --disable-bench --disable-gui-tests --disable-tests --with-daemon=no --without-gui --disable-wallet --with-boost=no` builds libconsensus. `./configure --with-boost=no` should always fail with: ``` checking whether to build Bitcoin Core GUI... yes (Qt5) configure: error: only libbitcoinconsensus can be built without boost ``` For anyone wondering why the check comes after the AX_BOOST_BASE check, see this [comment](https://github.com/bitcoin/bitcoin/pull/11806#discussion_r155359394). "the AX_BOOST_BASE macro that does the --with-boost handling (along with the actual checks), and sets "want_boost". " Fixes #10826, replaces #11806. @theuni if you re-ACK we can get this merged. Tree-SHA512: f0b8f483586465187ca6689e731b24ff77da41a06fb5c9d6390c82990719911dd54ebcccaf6d4fcea2be92986cc7fa88ed979e6cb9d77917920181e5e5188067
2017-12-18[build] Warn that only libconsensus can be built without boostVarunram
2017-12-17remove unused fNoncriticalErrors variable from CWalletDB::FindWalletTxPierre Rochard
2017-12-16Merge #11916: Typo fixMarcoFalke
58c909d8d1 Typo fix (flack) Pull request description: Tree-SHA512: 8ed89086230a257f4e3261972420feef60ceb618bfe75e0392a1c0cef72c20a55259bc9aec4fa79ef27c6ac8e7aec1275ff442efa539c5951b6e7c695883ab1b
2017-12-16Typo fixflack
2017-12-15Merge #11886: Clarify getbalance meaning a tiny bit in response to questions.Wladimir J. van der Laan
c79d73d Clarify getbalance meaning a tiny bit in response to questions. (Matt Corallo) Pull request description: Someone was asking why getbalance "*" was more "correct" than getbalance, which should rarely be true...spendzeroconfchange was the issue. Tree-SHA512: 90201cad1acec5161aee469fb4c6d737a0eb90f8380ac93abf0e41e0f02d120afcc3e2e873e5096d3655bb63bbd16fe99e72452f308d72e69139c7f6bb2d745e
2017-12-15Merge #11616: Update ban-state in case of dirty-state during periodic sweepWladimir J. van der Laan
57ac471 Call BannedListChanged outside of cs_setBanned lock (Jonas Schnelli) c853812 Update ban-state in case of dirty-state during periodic sweep (Jonas Schnelli) Pull request description: We do currently not update the UI during periodic ban list sweeps (via dump banlist). Fixes #11612 Tree-SHA512: bffbdcc03c63042177bdd511b0a9187c211c2b5011178481e8ee3e43a71eef1e4cd6b72f73672babab142b644f62f8b56f0aac1d26d3f19372b1f8644fec9395
2017-12-14Merge #10839: Don't use pass by reference to const for cheaply-copied types ↵Wladimir J. van der Laan
(bool, char, etc.) 99ba0c3 Don't use pass by reference to const for cheaply-copied types (bool, char, etc.). (practicalswift) Pull request description: Don't use pass by reference to const for cheaply-copied types (`bool`, `char`, etc.). Tree-SHA512: ccad5e2695dff0b3d6de3e713ff3448f2981168cdac72d73bee10ad346b9919d8d4d588933369e54657a244b8b222fa0bef919bc56d983e1fa64b2004e51b225
2017-12-14Merge #11842: [build] Add missing stuff to clean-localWladimir J. van der Laan
b341143 [build] Add missing stuff to clean-local - test/functional/test_framework/__pycache__ - test/cache (Karl-Johan Alm) Pull request description: After doing ``` ./autogen.sh && ./configure && make make clean make distclean ``` and moving `.gitignore` aside, the following files still remain after this patch: ``` Makefile.in aclocal.m4 autom4te.cache/ build-aux/compile build-aux/config.guess build-aux/config.sub build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh build-aux/m4/libtool.m4 build-aux/m4/ltoptions.m4 build-aux/m4/ltsugar.m4 build-aux/m4/ltversion.m4 build-aux/m4/lt~obsolete.m4 build-aux/missing build-aux/test-driver configure doc/man/Makefile.in src/Makefile.in src/config/bitcoin-config.h.in ``` Most are automake related so I guess it's fine if they litter around. Tree-SHA512: 7566f56a79932cc1d6ee6ff487d121e3909db57167775e1b27209d93bcc1c14e47b0fcc9c0c272c4b9df907c1bc0664f02006a21b3b6939fa50fc2a5762729e4
2017-12-14Merge #11884: Remove unused include in hash.cppWladimir J. van der Laan
3f09e03 Remove unused include in hash.cpp (Karl-Johan Alm) Pull request description: Tree-SHA512: 543a72656460fba1c5498a0b85c49601d9b0399a4ecc49f4acf4715c258918da729df388e3be724c3161438e903ee16ad3c50626a71483aa6d85ffdbb827742d
2017-12-14Merge #11864: Make CWallet::FundTransaction atomicWladimir J. van der Laan
03a5dc9 [wallet] Make CWallet::FundTransaction atomic (João Barbosa) 95d4450 [wallet] Tidy up CWallet::FundTransaction (João Barbosa) Pull request description: This PR fixes a race for `setLockedCoins` when `lockUnspents` is true. For instance, it should not be possible to use the same unspent in concurrent `fundrawtransaction` calls. Now the `cs_main` and `cs_wallet` locks are held during `CreateTransaction` and `LockCoin`(s). Also added some style nits around the change. Tree-SHA512: ccf383c0c5f6db775655a3e9ccd200c3bd831a83afae2b7c389564c74f7227f5bea86a4775727de2c3603b188f383f8a12d3f9d6d94f7887865c31c94ce95ef6
2017-12-14[wallet] Make CWallet::FundTransaction atomicJoão Barbosa
2017-12-14[wallet] Tidy up CWallet::FundTransactionJoão Barbosa
2017-12-13Clarify getbalance meaning a tiny bit in response to questions.Matt Corallo
2017-12-13Merge #11877: Improve createrawtransaction functional testsWladimir J. van der Laan
88af502 test: Add createrawtransaction functional tests (João Barbosa) 27c6199 test: Add multidict to support dictionary with duplicate key (laanwj) (João Barbosa) 320669a rpc: Validate replaceable type in createrawtransaction (João Barbosa) Pull request description: This was motivated by the `Invalid parameter, duplicated address` test. Credit to @laanwj for `multidict` implementation. Tree-SHA512: a87139ae11004b73b467db1e8a072b75e23a0622b173a5668eed383b3575d8abc709817ddd2dfdc53f55afc90750fb61331199ad5de38c1ef6d482f2bc220f74
2017-12-13test: Add createrawtransaction functional testsJoão Barbosa
2017-12-13test: Add multidict to support dictionary with duplicate key (laanwj)João Barbosa
2017-12-13Merge #11558: Minimal code changes to allow msvc compilationWladimir J. van der Laan
fbf327b Minimal code changes to allow msvc compilation. (Aaron Clauson) Pull request description: These changes are required to allow the Bitcoin source to build with Microsoft's C++ compiler (#11562 is also required). I looked around for a better place for the typedef of ssize_t which is in random.h. The best candidate looks like src/compat.h but I figured including that header in random.h is a bigger change than the typedef. Note that the same typedef is in at least two other places including the OpenSSL and Berkeley DB headers so some of the Bitcoin code already picks it up. Tree-SHA512: aa6cc6283015e08ab074641f9abdc116c4dc58574dc90f75e7a5af4cc82946d3052370e5cbe855fb6180c00f8dc66997d3724ff0412e4b7417e51b6602154825
2017-12-13Remove unused include in hash.cppKarl-Johan Alm
2017-12-13Merge #11363: net: Split socket create/connectWladimir J. van der Laan
3830b6e net: use CreateSocket for binds (Cory Fields) df3bcf8 net: pass socket closing responsibility up to caller for outgoing connections (Cory Fields) 9e3b2f5 net: Move IsSelectableSocket check into socket creation (Cory Fields) 1729c29 net: split socket creation out of connection (Cory Fields) Pull request description: Requirement for #11227. We'll need to create sockets and perform the actual connect in separate steps, so break them up. #11227 adds an RAII wrapper around connection attempts, as a belt-and-suspenders in case a CloseSocket is missed. Tree-SHA512: de675bb718cc56d68893c303b8057ca062c7431eaa17ae7c4829caed119fa3f15b404d8f52aca22a6bca6e73a26fb79e898b335d090ab015bf6456cf417fc694
2017-12-12net: use CreateSocket for bindsCory Fields
2017-12-12net: pass socket closing responsibility up to caller for outgoing connectionsCory Fields
This allows const references to be passed around, making it clear where the socket may and may not be invalidated.
2017-12-12net: Move IsSelectableSocket check into socket creationCory Fields
We use select in ConnectSocketDirectly, so this check needs to happen before that. IsSelectableSocket will not be relevant after upcoming changes to remove select.
2017-12-12net: split socket creation out of connectionCory Fields
Also, check for the correct error during socket creation
2017-12-12Merge #11870: wallet: Remove unnecessary mempool lock in ↵Wladimir J. van der Laan
ReacceptWalletTransactions 5b25293 wallet: Remove unnecessary mempool lock in ReacceptWalletTransactions (João Barbosa) Pull request description: Tree-SHA512: 13b922c6c9b5ca95a77742050f449366b80bdd7819c34e7ca09af8a4bd68085f4d0c6e0cde119c403f661499f97f2c465071a8047a7d794268e8d2dfe909e6d5
2017-12-12Merge #11854: Split up key and script metadata for better type safetyWladimir J. van der Laan
9c8eca7 Split up key and script metadata for better type safety (Russell Yanofsky) Pull request description: Suggested by @TheBlueMatt https://github.com/bitcoin/bitcoin/pull/11403#discussion_r155599383 Combining the maps was probably never a good arrangement but is more problematic now in presence of WitnessV0ScriptHash and WitnessV0KeyHash types. Tree-SHA512: 9263e9c01090fb49221e91d88a88241a9691dda3e92d86041c8e284306a64d3af5e2438249f9dcc3e6e4a5c11c1a89f975a86d55690adf95bf2636f15f99f92a
2017-12-12rpc: Validate replaceable type in createrawtransactionJoão Barbosa
2017-12-12Merge #10574: Remove includes in .cpp files for things the corresponding .h ↵Wladimir J. van der Laan
file already included a720b92 Remove includes in .cpp files for things the corresponding .h file already included (practicalswift) Pull request description: Remove includes in .cpp files for things the corresponding .h file already included. Example case: * `addrdb.cpp` includes `addrdb.h` and `fs.h` * `addrdb.h` includes `fs.h` Then remove the direct inclusion of `fs.h` in `addrman.cpp` and rely on the indirect inclusion of `fs.h` via the included `addrdb.h`. In line with the header include guideline (see #10575). Tree-SHA512: 8704b9de3011a4c234db336a39f7d2c139e741cf0f7aef08a5d3e05197e1e18286b863fdab25ae9638af4ff86b3d52e5cab9eed66bfa2476063aa5c79f9b0346