aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-10-26Don't rely on locale dependent functions in base_blob<BITS>::SetHex(...) ↵practicalswift
(uint256), DecodeBase58(...), ParseMoney(...) and ParseHex(...)
2018-10-26Merge #14561: Remove fs::relative call and fix listwalletdir testsWladimir J. van der Laan
ed2e18398b3ab657e98e3e1fe135cbf8dd94fda3 Remove fs::relative call and fix listwalletdir tests (João Barbosa) Pull request description: The implementation of `fs::relative` resolves symlinks which is not intended in ListWalletDir. The replacement does what is required, and `listwalletdir` RPC tests are fixed accordingly. Also, `fs::recursive_directory_iterator` iteration is fixed to build with boost 1.47. Based on #14559 Tree-SHA512: 1da516226073f195285d10d9d9648c90cce0158c5d1eb9c31217bb4abb575cd37f07c00787c5a850554d6120bbc5a3cbc5cb47d4488b32ac6bcb52bc1882d600
2018-10-26Merge #14518: rpc: Always throw in getblockstats if -txindex is requiredWladimir J. van der Laan
3be209d103297aaf2fe4711e237a65046488ea19 rpc: Always throw in getblockstats if -txindex is required (João Barbosa) Pull request description: Previously blocks with only the coinbase transaction didn't cause the RPC error even if the requested stats required -txindex and it wasn't enabled. Fixes #14499. Tree-SHA512: d3a6402889e3ce7199632e79eba66d7d471ff7de5c564d35312e2340cc6d84ef544a8172548fbc2eedf5e637b56dc57bbf7a9815ab798c7f226755f897fd8f3e
2018-10-25Remove fs::relative call and fix listwalletdir testsJoão Barbosa
The implementation of fs::relative resolves symlinks which is not intended in ListWalletDir. The replacement does what is required, and listwalletdir tests are fixed accordingly. Also, building with boost 1.47 required 2 changes: - replace fs::relative with an alternative implementation; - fix fs::recursive_directory_iterator iteration.
2018-10-24appveyor: Enable multiwallet testChun Kuan Lee
2018-10-24Merge #14320: [bugfix] wallet: Fix duplicate fileid detectionWladimir J. van der Laan
4ea77320c5f0b275876be41ff530bb328ba0cb87 tests: add test case for loading copied wallet twice (Chun Kuan Lee) 2d796faf62095e83f74337c26e7e1a8c3957cf3c wallet: Fix duplicate fileid (Chun Kuan Lee) Pull request description: The implementation in current master can not detect if the file ID is duplicate with flushed `BerkeleyEnvironment`. This PR would store the file ID in a global variable `g_fileids` and release it when the `BerkeleyDatabase` close. So it won't have to rely on a `Db*`. Fix #14304 Tree-SHA512: 0632254b696bb4c671b5e2e5781e9012df54ba3c6ab0f919d9f6d31f374d3b0f8bd968b90b537884ac8c3d2906afdd58c2ce258666263464c7dbd636960b0e8f
2018-10-24Merge #14504: tests: show the progress of functional testsMarcoFalke
96c509e4d0 show the progress of functional test (Isidoro Ghezzi) Pull request description: example: (added the progress index `n/m`) ``` 1/107 - wallet_hd.py passed, Duration: 27 s ......................................................................................... 2/107 - mining_getblocktemplate_longpoll.py passed, Duration: 72 s .................................................................. 3/107 - feature_maxuploadtarget.py passed, Duration: 78 s ``` Tree-SHA512: 17b840048222e2c3676a92041b491521fee3b86049b2f2467a225aece40717732341801872d9867fcb7260e904e322c7184b76fca16d2dc687aa75dd741484ad
2018-10-24tests: add test case for loading copied wallet twiceChun Kuan Lee
2018-10-24Merge #14453: rpc: Fix wallet unload during walletpassphrase timeoutWladimir J. van der Laan
8907df9e02ec47ef249a7422faa766f06aa01e94 qa: Ensure wallet unload during walletpassphrase timeout (João Barbosa) 321decffa1fbf213462d97e5372bd0c4eeb99635 rpc: Fix wallet unload during walletpassphrase timeout (João Barbosa) Pull request description: Replaces the raw wallet pointer in the `RPCRunLater` callback with a `std::weak_ptr` to check if the wallet is not expired. To test: ``` bitcoind -regtest bitcoin-cli -regtest encryptwallet foobar bitcoin-cli -regtest walletpassphrase foobar 5 && bitcoin-cli -regtest unloadwallet "" ``` Fixes #14452. Tree-SHA512: 311e839234f5fb7955ab5412a2cfc1903ee7132ea56a8ab992ede3614586834886bd65192b76531ae0aa3a526b38e70ca2e1cdbabe52995906ff97b49d93c268
2018-10-24Merge #14296: [wallet] Remove addwitnessaddressMarcoFalke
2b91e42ece [docs] Add release note for removing getwitnessaddress (John Newbery) ebec90ac97 [wallet] Remove deprecated addwitnessaddress RPC method (John Newbery) 07e3f585ab [test] Remove deprecated addwitnessaddress from feature_segwit.py (John Newbery) 82f2fa03a5 [test] Remove deprecated addwitnessaddress from wallet_bumpfee.py (John Newbery) 9d7ee187a3 [test] Remove deprecated addwitnessaddress from p2p_compactblocks.py (John Newbery) 3cf77f0b3e [tests] Remove deprecated addwitnessaddress call from wallet_dump.py (John Newbery) bdefc9705d [tests] Remove deprecated addwitnessaddress call from feature_nulldummy (John Newbery) 67d7d67cf3 [test] Fix flake8 warnings in tests (John Newbery) Pull request description: Fully removes the `addwitnessaddress` RPC method, which was deprecated in V0.17 Tree-SHA512: 8fa8a2a721a81262fbdedbe1cef031e6a07aa6abbc9760dbc62738fc4f688b44bd737d0f3cdb1aec046866a6395befbfecde0f34e76a99e11d3cf566cad1d0de
2018-10-23Merge #14417: Fix listreceivedbyaddress not taking address as a stringMarcoFalke
d4d70eda33 Fix listreceivedbyaddress not taking address as a string (Eric Scrivner) Pull request description: Fixes #14173. Add the patch in #14173 and include a regression test. Tree-SHA512: 5a9794e0c43e90d18c899841afbaf15eb9129d7d2f6570fccf0a1793697fe170d224c3c3995b1a35c536fac19819042823d9e3bd23b019d0f03434499243d2f5
2018-10-23Merge #14468: [wallet] Deprecate generate RPC methodMarcoFalke
ab9aca2bdf [rpc] add 'getnewaddress' hint to 'generatetoaddress' help text. (John Newbery) c9f02955b2 [wallet] Deprecate the generate RPC method (John Newbery) aab81720de [tests] Add generate method to TestNode (John Newbery) c269209336 [tests] Small fixups before deprecating generate (John Newbery) Pull request description: Deprecates the `generate` RPC method. For concept discussion, see #14299. Fixes #14299. Tree-SHA512: 16a3b8b742932e4f0476c06b23de07a34d9d215b41d9272c1c9d1e39966b0c2406f17c5ab3cc568947620c08171ebe5eb74fd7ed4b62151363e305ee2937cc80
2018-10-22show the progress of functional testIsidoro Ghezzi
example (added the progress index `n/m`) ``` 1/107 - wallet_hd.py passed, Duration: 27 s ......................................................................................... 2/107 - mining_getblocktemplate_longpoll.py passed, Duration: 72 s .................................................................. 3/107 - feature_maxuploadtarget.py passed, Duration: 78 s ``` - clear dots line ``` $ test/functional/test_runner.py -t can_trash Temporary test directory at can_trash/test_runner_₿_🏃_20181018_220600 1/105 - wallet_hd.py passed, Duration: 21 s 2/105 - mining_getblocktemplate_longpoll.py passed, Duration: 71 s 3/105 - feature_maxuploadtarget.py passed, Duration: 68 s .................. ``` - don't print the `dot` progressive if `--quiet` - done_str - nothing commit to check again travis tests
2018-10-20Add tests for key origin supportPieter Wuille
2018-10-20Merge #14526: docs: Document lint testsMarcoFalke
8640631ebc docs: Document lint tests (Mason Simon) Pull request description: Replaces #13708. Fixed the macOS nit, and added `codespell` as a requirement. Tree-SHA512: efdef8238f9d4433cc6403f58075b906d39d6a2114821cb113a16f2fc45d0c10c603588272865edd40a0498d9685ff8ac25d2491d9fcf0f1f328b6d65751ac2c
2018-10-20qa: Ensure wallet unload during walletpassphrase timeoutJoão Barbosa
2018-10-20Merge #14456: test: forward timeouts properly in send_blocks_and_testMarcoFalke
94e21c1501 test: forward timeouts properly in send_blocks_and_test (James O'Beirne) Pull request description: Small change motivated by frustrations while writing `feature_block` tests; when a timeout is passed to `send_blocks_and_test` it isn't forwarded onto constituent waiting calls - you can end up waiting 60 seconds when you articulated e.g. 5. Respect the given timeout all the way down. Tree-SHA512: 3a964764fc5e3431ae3b17bd642a27a1bd4526541a799ef63696c9dab0289a005a13d645770be6e46ea262d22a58f79d2b407293a39397b036f616fe20c21241
2018-10-20docs: Document lint testsMason Simon
2018-10-19Merge #14426: utils: Fix broken Windows filelockPieter Wuille
369244f654 utils: Fix broken Windows filelock (Chun Kuan Lee) Pull request description: Fix broken filelock on Windows, also add a test for this. It's a regression introduced by #13862. Tree-SHA512: 15665b1930cf39ec71f3ab07def8e2897659f6fd4d2de749d63a5a8ec920e4a04282f12bc262f242b1b3d14d2dd9fa191ddbcf16a46fb927b5b2b14d9f6b5d01
2018-10-20Fix typoKristaps Kaupe
2018-10-19rpc: Always throw in getblockstats if -txindex is requiredJoão Barbosa
Previously blocks with only the coinbase transaction didn't cause the RPC error even if the requested stats required -txindex and it wasn't enabled.
2018-10-18Merge #14465: tests: Stop node before removing the notification filePieter Wuille
ca6d86c322 tests: Stop node before removing the notification file (Chun Kuan Lee) Pull request description: Stop node before removing the notification file to make sure the command has been terminated. After then we could removing those files safely and do not receive any permission error. (See #14446) The permission error is Windows specific, documented in python doc: >On Windows, attempting to remove a file that is in use causes an exception to be raised See https://docs.python.org/3/library/os.html#os.remove Tree-SHA512: fbdabf3a9a838bb59ba207dd9e9fbdd87c702a99ad66bee0b2b1537f80f8630d22d9d5e9c4ded23a82a66bfc10989227fb024b27393425abe0e5a2ad4e4cbb82
2018-10-19Merge #14291: wallet: Add ListWalletDir utility functionWladimir J. van der Laan
d56a0689354fb814510c6c393f3e07ac9362dc1f docs: Add release notes for listwalletdir RPC (João Barbosa) 0cb3cad166bbeb75e9cc1512286453f8e7d4f717 qa: Add tests for listwalletdir RPC (João Barbosa) cc3377360c417780f5cbd7bd69b438817a9d60be rpc: Add listwalletdir RPC (João Barbosa) d1b03b8e5f04a2cc9ebb985bd9a1aebd2068f757 interfaces: Add getWalletDir and listWalletDir to Node (João Barbosa) fc4db35bfd78d85d6b52d5da3d89696160658450 wallet: Add ListWalletDir utility (João Barbosa) Pull request description: `ListWalletDir` returns all available wallets in the current wallet directory. Based on MeshCollider work in pull #11485. Tree-SHA512: 5843e3dbd1e0449f55bb8ea7c241a536078ff6ffcaad88ce5fcf8963971d48c78600fbc4f44919523b8a92329d5d8a5f567a3e0ccb0270fdd27366e19603a716
2018-10-18qa: Add tests for listwalletdir RPCJoão Barbosa
2018-10-18[wallet] Deprecate the generate RPC methodJohn Newbery
2018-10-18[tests] Add generate method to TestNodeJohn Newbery
Adds a generate() method to the TestNode class in the test framework. This method intercepts calls to generate, imports a dewterministic private key to the node and then calls generatetoaddress to generate the block to that address. Note that repeated calls to importprivkey for the same private keys are no-ops, so it's fine to call the generate() method many times.
2018-10-19utils: Fix broken Windows filelockChun Kuan Lee
2018-10-16[tests] Small fixups before deprecating generateJohn Newbery
In advance of deprecating the generate RPC method, make some small changes to a small number of inidividual test cases: - make memory checking less prescriptive in wallet_basic.py - replace calls to generate with generatetoaddress in wallet_keypool.py - replace calls to generate with generatetoaddress and fixup label issues in wallet_labels.py - replace calls to generate with generatetoaddress in wallet_multiwallet.py
2018-10-16Add ignored word: mutpracticalswift
2018-10-16Revert "qa: Fix codespell error and have lint-spelling error instead of warn"practicalswift
This reverts commit e413c2ddd1240d7bacd1837fa49d25781fe6e5fa.
2018-10-14Fix listreceivedbyaddress not taking address as a stringEric Scrivner
Fixes #14173. Add the patch in #14173 and include a regression test.
2018-10-12tests: Stop node before removing the notification fileChun Kuan Lee
2018-10-10test: forward timeouts properly in send_blocks_and_testJames O'Beirne
2018-10-08Merge #13649: test: allow arguments to be forwarded to flake8 in lint-python.shMarcoFalke
854c85ae90 test: allow arguments to be forwarded to flake8 in lint-python.sh (James O'Beirne) Pull request description: In order to use `lint-python.sh` from within various in-editor linting frameworks (e.g. [ALE](https://github.com/w0rp/ale), [flycheck](https://github.com/flycheck/flycheck)), we need to allow its arguments to be forwarded to the wrapped flake8 invocation. For what it's worth, here's my bitcoin-specific ALE vim config for doing so (requires this changeset): ```vim $ grep python /home/james/src/bitcoin/.exrc let g:ale_python_flake8_executable="/home/james/src/bitcoin/test/lint/lint-python.sh" ``` Tree-SHA512: 0d5500238ea5fde26ee9c21f6518a3a3dc8409c77ad1271ff7e7a94ef45a8c8d2e1b8ad3df3075dd4062ee0fff534625b1bc79613f869cd3c2d9260814ffc7ee
2018-10-08Merge #14324: qa: Run more tests with wallet disabledMarcoFalke
faa4043c66 qa: Run more tests with wallet disabled (MarcoFalke) Pull request description: Instead of skipping the whole test, only skip the wallet specific section of a test if the wallet is not compiled in. This is mostly an indentation change, so can be reviewed with `--ignore-all-space`. Tree-SHA512: 5941a8b6b00dca5cf9438c5f6f010ba812115188a69e427d7ade4c1ab8cfe7a57c73daf52c66235dbb24b1cd9ab7c7a17c49bc23d931e041b605d79116a71f66
2018-10-08Merge #14413: tests: Allow closed rpc handler in assert_start_raises_init_errorMarcoFalke
62c304ea48 tests: Allow closed http server in assert_start_raises_init_error (Chun Kuan Lee) Pull request description: The rpc handler may be unregistered when http server haven't been closed yet. So it may be allowable to get -342 `non-JSON HTTP response with \'%i %s\' from server` (503 Service Unavailable) See https://ci.appveyor.com/project/DrahtBot/bitcoin/build/master.2001. It shows "Rejecting request while shutting down" between "RPC stopped" and "Stopped HTTP server" Tree-SHA512: e1f50ab9096cf23494ccc2850c01516c4a75f112c99108759157b22fce2011682a4b88216f206702f6a56e960182c00098053ad75f13aa0eafe27046adae63da
2018-10-08tests: Allow closed http server in assert_start_raises_init_errorChun Kuan Lee
2018-10-07Merge #14419: [tests] Remove rpc_zmq.pyMarcoFalke
42a995ae48 [tests] Remove rpc_zmq.py (John Newbery) Pull request description: rpc_zmq.py is racy and fails intermittently. Remove that test file and move the getzmqnotifications RPC test into interface_zmq.py. Tree-SHA512: 666c8f252f8a392deda1bd531e84fdc04bdae4eab09407657ade2b5fc0aeffa247735e20314236f56e4e3402476673f3b7538d6e09f5af6976021ba2377ce63c
2018-10-07Merge #13883: utils: Convert Windows args to utf-8 stringMarcoFalke
380c843217 utils: Convert Windows args to utf-8 string (Chun Kuan Lee) Pull request description: Create a new class `WinCmdLineArgs` when building for Windows. It converts all command line arguments to utf8 string. Tree-SHA512: f098520fd123a8a452bc84a55dc8c0b88f0c475410efe57f2ccc393f86c396eed59ea1575ddc1b920323792e390fdb092061d80cdcd9b682f0ac79a22a22ff82
2018-10-07[tests] Remove rpc_zmq.pyJohn Newbery
rpc_zmq.py is racy and fails intermittently. Remove that test file and move the getzmqnotifications RPC test into interface_zmq.py
2018-10-03test: Add missing call to skip_if_no_cli()practicalswift
2018-09-30utils: Convert Windows args to utf-8 stringChun Kuan Lee
2018-09-27Merge #14316: tests: exclude all tests with difference parameters in ↵MarcoFalke
`--exclude` list c7b3e487f2 tests: exclude all tests with difference parameters (Chun Kuan Lee) Pull request description: Fix broken exclusion list in functional tests. See https://github.com/bitcoin/bitcoin/pull/14007#pullrequestreview-158309105 Tree-SHA512: b6c2b86fef13e3c00c695adaeeb3e47ee9b48877c71bc605d24201ce931b2ef3ae9f5f199071fa1ec5de2d7aadc478410094c380cc297922e683e9b2569cda03
2018-09-27Merge #14307: Consolidate redundant implementations of ParseHashStrMarcoFalke
9c5af58d51 Consolidate redundant implementations of ParseHashStr (Ben Woosley) Pull request description: This change: * adds a length check to all calls to `ParseHashStr`, appropriate given its use to populate a 256-bit number from a hex str * allows the caller to handle the failure, which allows for the more appropriate `JSONRPCError` on failure in `prioritisetransaction` rpc Relative to #14288 Tree-SHA512: baa791147e5ceb3c30c70df3981aaf807bf7d4a90a0be3625540b59aa4b9a9d303a452bfef18bf167cbb833ef9591b4ef5948bf4a1ce67b421d804ae8d20ea53
2018-09-27Merge #12246: Bugfix: Only run bitcoin-tx tests when bitcoin-tx is enabledMarcoFalke
a2a04a5abb Bugfix: Only run bitcoin-tx tests when bitcoin-tx is enabled (Luke Dashjr) 92af71cea9 configure: Make it possible to build only one of bitcoin-cli or bitcoin-tx (Luke Dashjr) Pull request description: Includes #5618 (which the reasons for rejecting no longer hold true) Tree-SHA512: f30a8e4a2f70166b7cabef77c4674163b3a9da14c6a547d34f00d1056a19bf4d23e22851eea726fad2afc8735d5473ae91122c770b65ac3886663dc20e2c5b70
2018-09-27Merge #14305: Tests: enforce critical class instance attributes in ↵MarcoFalke
functional tests, fix segwit test specificity e460232876 Document fixed attribute behavior in critical test framework classes. (Justin Turner Arthur) 17b42f4122 Check for specific tx acceptance failures based on script signature (Justin Turner Arthur) 3a4449e9ad Strictly enforce instance attrs in critical functional test classes. (Justin Turner Arthur) 1d0ce94a54 Fix for incorrect version attr set on functional test segwit block. (Justin Turner Arthur) ba923e32a0 test: Fix broken segwit test (practicalswift) Pull request description: No extra attributes will be able to be added to instances of the C++ class ports or of other critical classes without causing an exception. Helps prevent adding or depending on attributes that aren't in the intended object structure. It may prevent issues such as the one fixed in bitcoin/bitcoin#14300. This request fixes the erroneous version attribute used in the p2p_segwit.py functional tests. This pull includes the commit from bitcoin/bitcoin#14300. Tree-SHA512: 1b8c58e7aa0f71075ed5ff3e5be0a5182599108d8cd9bce682feac3b1842508124288e9335432b16a43f40f159c9710899e6d84af1b5868f48c947bc6f3e07ec
2018-09-26Document fixed attribute behavior in critical test framework classes.Justin Turner Arthur
Per @jimmysong's suggestion in bitcoin/bitcoin#14305. Also corrects module for network objects and wrappers.
2018-09-26Check for specific tx acceptance failures based on script signatureJustin Turner Arthur
2018-09-26Strictly enforce instance attrs in critical functional test classes.Justin Turner Arthur
Additionally, removed redundant parentheses and added PEP-8 compliant spacing around those classes.
2018-09-26Merge #14282: [wallet] Remove -usehdMarcoFalke
7ac911afe7 [docs] Add release notes for removing `-usehd` (John Newbery) 25548b2958 [wallet] Remove -usehd (John Newbery) Pull request description: `-usehd` is no longer used (except to tell the user that they've set it incorrectly for the wallet that they're loading). Remove it (in the same spirit as #14272) Tree-SHA512: 5bdcd2bb9bb8504a01343595bcd1bd433d97b730255152c725103c1ac3fa3a9d9e5220a4c29d4c72307cf803e1c09d31080f83603c23dc77263846e17b1826f0