aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-12-29Merge #15026: [test] Rename rpc_timewait to rpc_timeoutMarcoFalke
4999992c34 whitespace: Split ~300 char line into multiple ones (MarcoFalke) fa71b38168 scripted-diff: Rename rpc_timewait to rpc_timeout (MarcoFalke) fa3e5786d0 scripted-diff: Remove unused 'split' parameter to setup_network (MarcoFalke) Pull request description: This is a bugfix, since wallet_dump currently uses the wrong name: https://github.com/bitcoin/bitcoin/blob/18857b4c4034af54e7ad3cbd78ff6f87f4f22567/test/functional/wallet_dump.py#L89-L92 Rename all to the same name with a scripted diff (and some unrelated cleanups). Tree-SHA512: 338ddd20dae12e6cf7aa7adbcfb239cf648017a1572b373f8431fecb184bd2a65492846d81e75a023864d9e41c94afb53044c16b79651a5937d34a5a6b772f81
2018-12-29Merge #14738: Tests: Fix running wallet_listtransactions.py individually ↵MarcoFalke
through test_runner.py 2474de0265 Fix running individually through test_runner.py, as suggested by @MarcoFalke (#14732) (Kristaps Kaupe) Pull request description: As suggested by @MarcoFalke. Resolves #14732. Tree-SHA512: b4e400ba06075e218dbd97d0390845f1c55be42a2b6fd70513381318cfc2693473ba1d0f9d7f379a96939d1960b53801fad7c02e06bddc50c5a835ad024c37ef
2018-12-29Merge #15022: tests: Upgrade Travis OS to XenialMarcoFalke
b6f0db69a9 Increase timeout of featuer_assumevalid test to fix flaky tests (Graham Krizek) aa9aca85f1 If tests are ran with (ASan + LSan), Docker needs access to ptrace (Graham Krizek) a3b8b43663 Update Travis base OS to Xenial (Graham Krizek) Pull request description: Update base Travis OS to `xenial` from `trusty`. Link to Travis Docs for Xenial: https://docs.travis-ci.com/user/reference/xenial/ As noted in the documentation, Docker version is also updated from `17.06` to `18.06` Also includes: - If running Bitcoin config with LSan sanitizer, Allow ptrace in Docker run command - Increase timeout of feature_assumevalid test to fix flaky tests Tree-SHA512: baf2eda0cbb9990c43c76de1aebc8dd4a3f540323ac1fe2e164ac3bcf1fe3afa3e5b026bfeb5d650dae09a6854695d5744c1130c2fa82ece86c6835ba152f68d
2018-12-29Merge #13743: refactor: Replace boost::bind with std::bindMarcoFalke
cb53b825c2 scripted-diff: Replace boost::bind with std::bind (Chun Kuan Lee) 2196c51821 refactor: Use boost::scoped_connection in signal/slot, also prefer range-based loop instead of std::transform (Chun Kuan Lee) Pull request description: Replace boost::bind with std::bind - In `src/rpc/server.cpp`, replace `std::transform` with simple loop. - In `src/validation.cpp`, store the `boost::signals2::connection` object and use it to disconnect. - In `src/validationinterface.cpp`, use 2 map to store the `boost::signals2::scoped_connection` object. Tree-SHA512: 6653cbe00036fecfc495340618efcba6d7be0227c752b37b81a27184433330f817e8de9257774e9b35828026cb55f11ee7f17d6c388aebe22c4a3df13b5092f0
2018-12-28Increase timeout of featuer_assumevalid test to fix flaky testsGraham Krizek
2018-12-27Merge #14930: test: pruning: Check that verifychain can be called when prunedMarcoFalke
fa3e874d69 test: pruning: Check that verifychain can be called when pruned (MarcoFalke) Pull request description: Tree-SHA512: b921e550fdad27b791665883ed9fc50210575b0f968840a45284ad0e060ddd443ea7b9b12c17916f68ad28877c58ac51a6acc76ae4ea71bf7bfb2f744b286884
2018-12-24Merge #14565: Overhaul importmulti logicMeshCollider
eacff95de Add release notes (Pieter Wuille) bdacbda25 Overhaul importmulti logic (Pieter Wuille) Pull request description: This is an alternative to #14558 (it will warn when fields are being ignored). In addition: * It makes sure no changes to the wallet are made when an error in the input exists. * It validates all arguments, and will fail if anything fails to parse. * Adds a whole bunch of sanity checks Tree-SHA512: fdee0b6aca8c643663f0bc295a7c1d69c1960951493b06abf32c58977f3e565f75918dbd0402dde36e508dc746c9310a968a0ebbacccc385a57ac2a68b49c1d0
2018-12-22whitespace: Split ~300 char line into multiple onesMarcoFalke
2018-12-22scripted-diff: Rename rpc_timewait to rpc_timeoutMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i -e 's/self.rpc_timewait/self.rpc_timeout/g' $(git grep -l self.rpc_timewait) -END VERIFY SCRIPT-
2018-12-22scripted-diff: Remove unused 'split' parameter to setup_networkMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i -e 's/, split=False//g' $(git grep -l 'def setup_network') -END VERIFY SCRIPT-
2018-12-22Merge #14960: lint/format-strings: Correctly exclude escaped percent symbolsMarcoFalke
57281199b8 lint/format-strings: Correctly exclude escaped percent symbols (Luke Dashjr) Pull request description: The current code fails to exclude correctly for patterns like `"%%%X"` Tree-SHA512: cac6f6fb3f06a9190310cd9764ec31cd7d636f9c831057622f418ae5fd2e1d80927a88f585d18f57b279ac21e81518f714dc1a25155377b9297741a73600461e
2018-12-21Merge #15013: test: Avoid race in p2p_timeoutsMarcoFalke
fabcd645b9 test: Avoid racy test p2p_timeouts (MarcoFalke) Pull request description: Avoid filesystem/network racyness by sleeping another second. The alternative would be to poll the `debug.log`, but that seems overkill to avoid a sleep in a test that already requires them. Tree-SHA512: 32de75ecba38426323158fda241e37ffae73806d8c0e60b7ad73fb917e9cd25a3e5f0722cbc6f2f7a5b86501221c317783266bc2e3b4697fb120f05898ccc12d
2018-12-21Merge #14811: Mining: Enforce that segwit option must be set in GBTMarcoFalke
d2ce315fbf [docs] add release note for change to GBT (John Newbery) 0025c9eae4 [mining] segwit option must be set in GBT (John Newbery) Pull request description: Calling getblocktemplate without the segwit rule specified is most likely a client error, since it results in lower fees for the miner. Prevent this client error by failing getblocktemplate if called without the segwit rule specified. Of the previous 1000 blocks (measured at block [551591 (hash 0x...173c811)](https://blockstream.info/block/000000000000000000173c811e79858808abc3216af607035973f002bef60a7a)), 991 included segwit transactions. Tree-SHA512: 7933b073d72683c9ab9318db46a085ec19a56a14937945c73f783ac7656887619a86b74db0bdfcb8121df44f63a1d6a6fb19e98505b2a26a6a8a6e768e442fee
2018-12-21test: Avoid racy test p2p_timeoutsMarcoFalke
2018-12-21Merge #15005: test: Bump timeout to run tests in travis thread sanitizerMarcoFalke
fa05d52af4 test: Bump timeout to run tests in travis thread sanitizer (MarcoFalke) Pull request description: No need to exclude tests because their timeout was set too strict Tree-SHA512: ea7032e674a66456bab40122adf4beebd703fd626a7567ca76d2a4e78041af115564d863dc7f742d39bd4adb249c29751439a1238d5e5c34e474c7221d4fd6e1
2018-12-21Merge #14653: rpcwallet: Add missing transaction categories to rpc helptextsMarcoFalke
f3f6dde56e Test coinbase category in wallet rpcs (andrewtoth) e982f0b682 Add all category options to wallet rpc help (andrewtoth) Pull request description: The current helptext for `listtransactions`, `listsinceblock` and `gettransaction` only list two of the five possible options for `category`. This incorrectly implies that these are the only two options, and can cause problems if the other three options aren't accounted for. Also, some of the documentation is incorrect when specifying which options are returned for which categories. This PR updates the helptext for these RPCs and adds a functional regression test for the cases when the other three categories are returned. Tree-SHA512: 67dd7ff6269a3b0f17f5d1a61b0ae1fb1f3778f05e1c440bfbb9b3a005c9c6d740abcace20f3d597cf2bd6779c494448690f13fab0bd2340f206213bc7890b51
2018-12-20test: Bump timeout to run tests in travis thread sanitizerMarcoFalke
2018-12-18rpc: Fix data race (UB) in InterruptRPC()practicalswift
2018-12-19Merge #14829: travis: Enable functional tests in the ThreadSanitizer (TSan) ↵MarcoFalke
build job eaf4070e3a Add suppression for InterruptRPC (fRPCRunning) data race (practicalswift) 5e5138a721 travis: Use trap and set -e errtrace (Chun Kuan Lee) 069752b726 build: Enable functional tests in the ThreadSanitizer (TSan) build job (practicalswift) Pull request description: Enable functional tests in the ThreadSanitizer (TSan) build job. This is a follow-up to @MarcoFalke's #14764 which added TSan but for unit tests only. Tree-SHA512: dcc24d311fa124772c3036b16c2bf94732ece36c3e22b4bb8fe941772e52157ab2b1a90b1880b81079c2eef2d344ca7e1da58324b75dbf82d16204d591ad49fb
2018-12-18Add suppression for InterruptRPC (fRPCRunning) data racepracticalswift
2018-12-17Merge #14964: test: Fix race in mempool_acceptMarcoFalke
faee59103d test: Fix race in mempool_accept (MarcoFalke) Pull request description: If we happen to pick the same random coin to spend, there would be mempool conflicts in some runs of the test. Fix that by popping from a static list of coins to spend from. Tree-SHA512: f6fd37e43d919371aa8bc3a2c93b569f9169961fe702f3641bb63180c3a88f12ca1857e9ed4d3723d5f04ca8ab5ef009a90e679580f36246a10b987620a55bee
2018-12-17build: Enable functional tests in the ThreadSanitizer (TSan) build jobpracticalswift
2018-12-14test: Fix race in mempool_acceptMarcoFalke
2018-12-14Merge #14931: test: mempool_persist: Verify prioritization is dumped correctlyMarcoFalke
fa30a0e7f7 test: mempool_persist: Verify prioritization is dumped correctly (MarcoFalke) Pull request description: Tree-SHA512: ef39c470cd418443741b55e9765ee84e0a87a44e7756f88dea86df9b4d37a121a4fbcb97976fbe4693692691650fb1196093b7dadd3922359eb4720845d28f05
2018-12-14Merge #14951: Revert "tests: Support calling add_nodes more than once"MarcoFalke
fa4b8c90d3 test: add_nodes can only be called once after set_test_params (MarcoFalke) faa831102a Revert "tests: Support calling add_nodes more than once" (MarcoFalke) Pull request description: Writing tests should be straightforward and with little side-effects as possible. I don't see how this is needed and can not be achieved with `self.num_nodes` (and `self.extra_args` et al.) Tree-SHA512: 83a67f2cba9d97e21d80847ff405a4633fcb0d5674486efa57ee1813e46efe8709ae0fb462b8339a01ebeca5c4f2d29ecb1807d648b8fd9ee8ce336b08d580a8
2018-12-14lint/format-strings: Correctly exclude escaped percent symbolsLuke Dashjr
2018-12-13test: add_nodes can only be called once after set_test_paramsMarcoFalke
2018-12-13Merge #14947: scripts: Remove Python 2 import workaroundsMarcoFalke
4de11a3682 Remove Python 2 import workarounds (practicalswift) Pull request description: Remove Python 2 import workarounds. As noted by @jnewbery in https://github.com/bitcoin/bitcoin/pull/14903#discussion_r241396925: > This exception handling is a vestige from when github-merge.py supported Python 2 and Python 3. We only support Python 3 now so we should be able to remove it entirely and just import from urllib.request. Tree-SHA512: e0d21e6299dd62fb669ad95cbd3d19f7c803195fd336621aac72fd10ddc7431d90443831072a2e1eb2fc880d1d88eb7c3e2ead3da59f545f6db07d349af98fb3
2018-12-13Revert "tests: Support calling add_nodes more than once"MarcoFalke
This reverts commit 98a1846b00d9c3076d6dcd96244fae6f923e26a0.
2018-12-13Remove Python 2 import workaroundspracticalswift
2018-12-13Merge #14805: tests: Support calling add_nodes more than onceWladimir J. van der Laan
98a1846b00d9c3076d6dcd96244fae6f923e26a0 tests: Support calling add_nodes more than once (Steven Roose) Pull request description: Ran into this while writing [a multi-chain test for Elements](https://github.com/ElementsProject/elements/pull/458) where I call this method more than once. Tree-SHA512: f2d698fcb560552aa5d81a4c3fbf40b7269b228b34d85a118291649ef83f8c0a30cd82a28d418237b55893bcecd538046b704e64a4d8a41f2c0aef8033dc83e5
2018-12-13Merge #14926: test: consensus: Check that final transactions are validWladimir J. van der Laan
aaaa8eb1edba2a28916d5da6001d421c1b1b253b test: consensus: Check that final transactions are valid (MarcoFalke) fae3617d79deee73dd375dc3ea5f4204a74420c5 test: Correctly deserialize without witness (MarcoFalke) Pull request description: There is no check that checks that final transactions are valid, i.e. the consensus rules could be changed (accidentally) with none of the tests failing. Tree-SHA512: 48f4c24bfcc525ddbc1bfe8c37131953b464823428c1f7a278ba6d98b98827b6b84a8eb2b33396bfb5b8cc4012b7cc1cd771637f405ea20beddae001c22aa290
2018-12-13Merge #14884: Travis: enforce Python 3.4 support through linterWladimir J. van der Laan
31926ee8cfc73501524dfa0fef2ccbaa786d6a00 [test] functional framework: add CScript hex() for Python 3.4 (Sjors Provoost) 74ce32683199b987e45eb16f0320ae392ff10edc [test] Travis: enforce Python 3.4 support in functional tests (Sjors Provoost) Pull request description: The minimum supported version of Python is 3.4 according to [dependencies.md](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md). This PR makes the Travis linter use this version in order to catch accidental use of modern syntax. Tree-SHA512: 71b2c102be72b135a8ba049378d66875760f20a04a657102a399240c5c2b2ddbdfa7d5ab4c0c0242ecc3259e0ee8eb2273f331bc5eb824f4ae4c3cc58aea37ac
2018-12-13Merge #14903: tests: Handle ImportError explicitly, improve comparisons ↵Wladimir J. van der Laan
against None c9ba253f4f5d675d7736d24c1167229d0898ef1a Add E711 to flake8 check (Daniel Ingram) 17b55202dae8d6e21d2490de89b345c55f7694c0 Compare to None with is/is not (Daniel Ingram) 1b89074ae27ce123adbeed57343deaef13c14f81 Change '== None' to 'is None' (Daniel Ingram) 16d293772365d57cc1a279d5ad0fa6f44b12ed54 Handle exception as ImportError (Daniel Ingram) Pull request description: Tree-SHA512: aa5875ea3d9ac47ac898545ff023b511042cd377ea0c4594074daae119f3d4f3fc295721aad94a732a907086ecb32bce19a8eed38adf479f12663c4e8944f721
2018-12-12Overhaul importmulti logicPieter Wuille
This introduces various changes to the importmulti logic: * Instead of processing input and importing things at the same time, first process all input data and verify it, so no changes are made in case of an error. * Verify that no superfluous information is provided (no keys or scripts that don't contribute to solvability in particular). * Add way more sanity checks, by means of descending into all involved scripts.
2018-12-12[test] functional framework: add CScript hex() for Python 3.4Sjors Provoost
test/functional/wallet_importmulti.py failed with: AttributeError: 'CScript' object has no attribute 'hex'
2018-12-12[test] Travis: enforce Python 3.4 support in functional testsSjors Provoost
Make lint/check-doc.py Python 3.4 compatible. Also add .python-version for pyenv which will cause tests with too modern syntax to fail on developer machine rather than on Travis.
2018-12-11test: mempool_persist: Verify prioritization is dumped correctlyMarcoFalke
2018-12-11test: pruning: Check that verifychain can be called when prunedMarcoFalke
2018-12-11Merge #14886: [tests] Refactor importmulti testsMarcoFalke
ee3b21dccb [tests] Add docstring for wallet_importmulti.py (John Newbery) fbdba40594 [tests] add test_address method to wallet_import.py (John Newbery) fd3a02c381 [tests] add test_importmulti method to wallet_import.py (John Newbery) 08a4a0f70f [tests] add get_multisig function to wallet_importmulti.py (John Newbery) 7c99614b40 [tests] add get_key function to wallet_importmulti.py (John Newbery) e5a8ea8f14 [tests] tidy up imports in wallet_importmulti.py (John Newbery) cb41ade6b1 [tests] fix flake8 warnings in wallet_importmulti.py (John Newbery) Pull request description: https://github.com/bitcoin/bitcoin/pull/14565 needs test coverage. This PR refactors wallet_importmulti.py to the following pattern: 1. Add `get_key()` and `get_multisig()` methods, which generate keys on node0 and return the priv/pubkeys and all scriptPubKey and address variants. 2. Add `test_importmulti()` method, which takes an importmulti request, sends it to node1 and tests against success and error codes/messages. 3. Add `test_address()` method, which takes an address, sends it as a getaddressinfo request to node1 and tests the values returned. This does not add any specific testing for #14565, but makes it very straightforward to add that testing: `test_importmulti()` can be easily updated to test for returned warnings, and `test_address()` can be called multiple times against the different address variants for a singlesig/multisig. Tree-SHA512: e0ae9d3436f0b4eec4f6b9bdc0f02aef49c5a16bbac319fd47b2cfcaf01d01780d7b296280e8760686a57fac63275eec09e2959d8aaeceae1b406d8eff768435
2018-12-11Merge #14857: wallet_keypool_topup.py: Test for all keypool address typesMarcoFalke
0dcac51049 wallet_keypool_topup.py: Test for all keypool address types (Gregory Sanders) Pull request description: To protect against regressions if key scanning is changed. Tree-SHA512: d1c4bb033bafd97203a3f68fb262a501442be947907d67902f0391fbdec39c095196403c7675e602806cc68d7e2d1f552ab339a58346162379978d06dad1c4bb
2018-12-11test: consensus: Check that final transactions are validMarcoFalke
2018-12-11test: Correctly deserialize without witnessMarcoFalke
2018-12-10[mining] segwit option must be set in GBTJohn Newbery
Calling getblocktemplate without the segwit rule specified is most likely a client error, since it results in lower fees for the miner. Prevent this client error by failing getblocktemplate if called without the segwit rule specified.
2018-12-10[tests] Add docstring for wallet_importmulti.pyJohn Newbery
Adds a docstring describing the new importmulti test.
2018-12-10[tests] add test_address method to wallet_import.pyJohn Newbery
Adds a new test_address method for testing the imported addresses.
2018-12-10[tests] add test_importmulti method to wallet_import.pyJohn Newbery
Adds a new test_importmulti method for testing the importmulti RPC method.
2018-12-10[tests] add get_multisig function to wallet_importmulti.pyJohn Newbery
Adds a new get_multisig function which generates a new multisig and returns the public keys, private keys and all script and address types.
2018-12-10[tests] add get_key function to wallet_importmulti.pyJohn Newbery
Adds a new get_key function which generates a new key and returns the public key, private key and all script and address types.
2018-12-10Add E711 to flake8 checkDaniel Ingram