aboutsummaryrefslogtreecommitdiff
path: root/test/functional
AgeCommit message (Collapse)Author
2020-11-04Merge #20282: wallet: change upgradewallet return type to be an objectSamuel Dobson
2ead31fb1b17c9b183a4b81f0ae4f48e5cf67d64 [wallet] Return object from upgradewallet RPC (Sishir Giri) Pull request description: Change the return type of upgradewallet to be an object for future extensibility. Also return any error string returned from the `UpgradeWallet()` function. ACKs for top commit: MarcoFalke: ACK 2ead31fb1b17c9b183a4b81f0ae4f48e5cf67d64 meshcollider: Tested ACK 2ead31fb1b17c9b183a4b81f0ae4f48e5cf67d64 Tree-SHA512: bcc7432d2f35093ec2463ea19e894fa885b698c0e8d8e4bd2f979bd4d722cbfed53ec589d6280968917893c64649dc9e40800b8d854273b0f9a1380f51afbdb1
2020-11-02Merge #18788: tests: Update more tests to work with descriptor walletsWladimir J. van der Laan
c7b7e0a69265946aecc885be911c7650911ba2e3 tests: Make only desc wallets for wallet_multwallet.py --descriptors (Andrew Chow) d4b67ad214ada7645c4ce2d5ec336fe5c3f7f7ca Avoid creating legacy wallets in wallet_importdescriptors.py (Andrew Chow) 6c9c12bf87f95066acc28ea2270a00196eb77703 Update feature_backwards_compatibility for descriptor wallets (Andrew Chow) 9a4c631e1c00eb1661c000978b133d7aa0226290 Update wallet_labels.py to not require descriptors=False (Andrew Chow) 242aed7cc1d003e8fed574bbebd19c7e54e23402 tests: Add a --legacy-wallet that is mutually exclusive with --descriptors (Andrew Chow) 388053e1722632c2e485c56a444bc75cf0152188 Disable some tests for tool_wallet when descriptors (Andrew Chow) 47d3243160fdec7e464cfb8f869be7f5d4ee25fe Make raw multisig tests legacy wallet only in rpc_rawtransaction.py (Andrew Chow) 59d3da5bce4ebd9c2291d8f201a53ee087938b21 Do addmultisigaddress tests in legacy wallet mode in wallet_address_types.py (Andrew Chow) 25bc5dccbfd52691adca6edd418dd54290300c28 Use importdescriptors when in descriptor wallet mode in wallet_createwallet.py (Andrew Chow) 0bd1860300b13b12a25d330ba3a93ff2d13aa379 Avoid dumpprivkey and watchonly behavior in rpc_signrawtransaction.py (Andrew Chow) 08067aebfd7e838e6ce6b030c31a69422260fc6f Add script equivalent of functions in address.py (Andrew Chow) 86968882a8a26312a7af29c572313c4aff488c11 Add descriptor wallet output to tool_wallet.py (Andrew Chow) 3457679870e8eff2a7d14fe59a479692738c48b6 Use separate watchonly wallet for multisig in feature_nulldummy.py (Andrew Chow) a42652ec10c733a5bf37e418e45d4841f54331b4 Move import and watchonly tests to be legacy wallet only in wallet_balance.py (Andrew Chow) 4b871909d6e4a51888e062d322bf53263deda15e Use importdescriptors for descriptor wallets in wallet_bumpfee.py (Andrew Chow) c2711e4230d9a423ead24f6609691fb338b1d26b Avoid dumpprivkey in wallet_listsinceblock.py (Andrew Chow) 553dbf9af4dea96e6a3e79bba9607003342029bd Make import tests in wallet_listtransactions.py legacy wallet only (Andrew Chow) dc81418fd01021070f3f66bab5fee1484456691a Use a separate watchonly wallet in rpc_fundrawtransaction.py (Andrew Chow) a357111047411f18c156cd34a002a38430f2901c Update wallet_importprunedfunds to avoid dumpprivkey (Andrew Chow) Pull request description: I went through all the tests and checked whether they passed with descriptor wallets. This partially informed some changes in #16528. Some tests needed changes to work with descriptor wallets. These were primarily due to import and watchonly behavior. There are some tests and test cases that only test legacy wallet behavior so those tests won't be run with descriptor wallets. This PR updates more tests to have to the `--descriptors` switch in `test_runner.py`. Additionally a mutually exclusive `--legacy-wallet` option has been added to force legacy wallets. This does nothing currently but will be useful in the future when descriptor wallets are the default. For the tests that rely on legacy wallet behavior, this option is being set so that we don't forget in the future. Those tests are `feature_segwit.py`, `wallet_watchonly.py`, `wallet_implicitsegwit.py`, `wallet_import_with_label.py`, and `wallet_import_with_label.py`. If you invert the `--descriptors`/`--legacy-wallet` default so that descriptor wallets are the default, all tests (besides the legacy wallet specific ones) will pass. ACKs for top commit: MarcoFalke: review ACK c7b7e0a69265946aecc885be911c7650911ba2e3 🎿 laanwj: ACK c7b7e0a69265946aecc885be911c7650911ba2e3 Tree-SHA512: 2f4e87815005d1d0a2543ea7947f7cd7593d8cf5312228ef85f8e096f19739b225769961943049cb44f6f07a35b8de988e2246ab9aca5bb5a0b2e62694d5637d
2020-11-02Merge #20165: Only relay Taproot spends if next block has it activeMarcoFalke
3d0556d41087f945ed0a47a5d770076ad42ce432 Increase feature_taproot inactive test coverage (Pieter Wuille) 525cbd425e2f6a1dbd0febc53d7ada22cec4661f Only relay Taproot spends if next block has it active (Pieter Wuille) Pull request description: There should be no change to mempool transaction behavior for witness v1 transactions as long as no activation is defined. Until that point, we should treat the consensus rules as under debate, and for soft-fork safety, that means spends should be treated as non-standard. It's possible to go further: don't relay them unless the consensus rules are actually active for the next block. This extends non-relay to the period where a deployment is defined, started, locked in, or failed. I see no downsides to this, and the code change is very simple. ACKs for top commit: Sjors: utACK 3d0556d41087f945ed0a47a5d770076ad42ce432 MarcoFalke: review ACK 3d0556d41087f945ed0a47a5d770076ad42ce432 🏓 jnewbery: utACK 3d0556d41087f945ed0a47a5d770076ad42ce432 Tree-SHA512: ca625a2981716b4b44e8f3722718fd25fd04e25bf3ca1684924b8974fca49f7c1d438fdd9dcdfbc091a442002e20d441d42c41a0e2096e74a61068da6c60267a
2020-11-02[wallet] Return object from upgradewallet RPCSishir Giri
2020-11-01tests: Make only desc wallets for wallet_multwallet.py --descriptorsAndrew Chow
2020-11-01Avoid creating legacy wallets in wallet_importdescriptors.pyAndrew Chow
2020-11-01Update feature_backwards_compatibility for descriptor walletsAndrew Chow
2020-11-01Update wallet_labels.py to not require descriptors=FalseAndrew Chow
2020-11-01tests: Add a --legacy-wallet that is mutually exclusive with --descriptorsAndrew Chow
Although legacy wallet is still the default, for future use, add a --legacy-wallet option to the test framework. Additional tests for descriptor wallets have been enabled with the --descriptors option. Tests that must be legacy wallet only are being started with --legacy-wallet. Even though this option does not currently do anything, this will be helpful in the future when descriptor wallets become the default.
2020-11-01Disable some tests for tool_wallet when descriptorsAndrew Chow
Some tests are legacy wallet only (and make legacy wallets) so they shouldn't be run when doing descriptor wallet tests.
2020-11-01Make raw multisig tests legacy wallet only in rpc_rawtransaction.pyAndrew Chow
The traditional multisig workflow doesn't work with descriptor wallets so make these tests legacy wallet only.
2020-11-01Do addmultisigaddress tests in legacy wallet mode in wallet_address_types.pyAndrew Chow
addmultisigaddress is not available in descriptor wallets, so only run these when testing legacy wallets
2020-11-01Use importdescriptors when in descriptor wallet mode in wallet_createwallet.pyAndrew Chow
sethdseed and importmulti are not available for descriptor wallets, so when doing descriptor wallet tests, use importdescriptors instead. Also changes some output to match what descriptor wallets will return.
2020-11-01Avoid dumpprivkey and watchonly behavior in rpc_signrawtransaction.pyAndrew Chow
dumpprivkey and watchonly behavior don't work with descriptor wallets. Test for multisigs is modified to not rely on watchonly behavior for those multisigs. This has a side effect of removing listunspent, but that's not the target of this test, so that's fine.
2020-11-01Add script equivalent of functions in address.pyAndrew Chow
2020-11-01Add descriptor wallet output to tool_wallet.pyAndrew Chow
Descriptor wallets output slightly different information in the wallet tool, so check that output when in descriptor wallet mode.
2020-11-01Use separate watchonly wallet for multisig in feature_nulldummy.pyAndrew Chow
Create and import the multisig into a separate watchonly wallet so that feature_nulldummy.py works with descriptor wallets. blocktools.create_raw_transaction is also updated to use multiple nodes and wallets and to use PSBT so that this test passes.
2020-11-01Move import and watchonly tests to be legacy wallet only in wallet_balance.pyAndrew Chow
Imports and watchonly behavior are legacy wallet only, so make them only run when the test is in legacy wallet mode.
2020-11-01Use importdescriptors for descriptor wallets in wallet_bumpfee.pyAndrew Chow
If using descriptor wallets, use importdescriptors instead of importmulti.
2020-11-01Avoid dumpprivkey in wallet_listsinceblock.pyAndrew Chow
Generate a privkey in the test framework instead of using dumpprivkey so that descriptor wallets work in this test.
2020-11-01Make import tests in wallet_listtransactions.py legacy wallet onlyAndrew Chow
Existing import* RPCs are disabled for descriptor wallets, so only do these tests for legacy wallets.
2020-11-01Use a separate watchonly wallet in rpc_fundrawtransaction.pyAndrew Chow
Import things into a separate watchonly wallet to work with descriptor wallets.
2020-11-01Update wallet_importprunedfunds to avoid dumpprivkeyAndrew Chow
Removes the use of dumpprivkey so that descriptor wallets can pass on this. Also does a few descriptor wallet specific changes due to different IsMine semantics.
2020-10-30Increase feature_taproot inactive test coveragePieter Wuille
2020-10-30Only relay Taproot spends if next block has it activePieter Wuille
2020-10-29Ensure a legacy wallet for BDB format checkAndrew Chow
2020-10-29Skip --descriptor tests if sqlite is not compiledAndrew Chow
2020-10-29Merge #20186: wallet: Make -wallet setting not create walletsMarcoFalke
01476a88a6095fd3af71cb9bf1eadef920a1197b wallet: Make -wallet setting not create wallets (Russell Yanofsky) Pull request description: This changes `-wallet` setting to only load existing wallets, not create new ones. - Fixes settings.json corner cases reported by sjors & promag: https://github.com/bitcoin-core/gui/issues/95, https://github.com/bitcoin/bitcoin/pull/19754#issuecomment-685858578, https://github.com/bitcoin/bitcoin/pull/19754#issuecomment-685858578 - Prevents accidental creation of wallets reported most recently by jb55 http://www.erisian.com.au/bitcoin-core-dev/log-2020-09-14.html#l-355 - Simplifies behavior after #15454. #15454 took the big step of disabling creation of the default wallet. This PR extends it to avoid creating other wallets as well. With this change, new wallets just aren't created on startup, instead of sometimes being created, sometimes not. #15454 release notes are updated here and are simpler. This change should be targeted for 0.21.0. It's a bug fix and simplifies behavior of the #15937 / #19754 / #15454 features added in 0.21.0. --- This PR is implementing the simplest, most basic alternative listed in https://github.com/bitcoin-core/gui/issues/95#issuecomment-694236940. Other improvements mentioned there can build on top of this. ACKs for top commit: achow101: ACK 01476a88a6095fd3af71cb9bf1eadef920a1197b hebasto: re-ACK 01476a88a6095fd3af71cb9bf1eadef920a1197b MarcoFalke: review ACK 01476a88a6095fd3af71cb9bf1eadef920a1197b 🏂 Tree-SHA512: 0d50f4e5dfbd04a2efd9fd66c02085a0ed705807bdec1cf5770d0ae8cb6af07080fb81306349937bf66acdb713d03fb35636f6442b650d0820e66cbae09c2f87
2020-10-29Merge #19753: p2p: don't add AlreadyHave transactions to recentRejectsWladimir J. van der Laan
d419fdedbe34c7ea19c0473660cc1b486b4e70d8 [net processing] Don't add AlreadyHave txs to recentRejects (Troy Giorshev) Pull request description: If we already have a transaction, don't add it to recentRejects Now, we only add a transaction to our recentRejects filter if we didn't already have it, meaning that it is added at most once, as intended. ACKs for top commit: jnewbery: Code review ACK d419fdedbe34c7ea19c0473660cc1b486b4e70d8 laanwj: Code review ACK d419fdedbe34c7ea19c0473660cc1b486b4e70d8 Tree-SHA512: cff5c1ba36c4700e2d6ab3eec4a3e51e1bef28fb3cc1bc850c84e06d6e5a9f6c32825207c253cc9cdf596b2eaadb6b5be68b3f8ca752b4ef6c31cf85138e3c99
2020-10-28[tests] Remove getnettotals/getpeerinfo consistency testJohn Newbery
We make no guarantees about consistency between RPC calls.
2020-10-27[test] Clarify setup of node topology.Amiti Uttarwar
Since the test framework automatically sets up a connection between the nodes, the second connect_nodes call was a no-op. Remove the redundant call & add comments to explain the expected topology.
2020-10-27[move-only, test]: Match test order with run orderAmiti Uttarwar
2020-10-27[net processing] Don't add AlreadyHave txs to recentRejectsTroy Giorshev
Now, we only add a transaction to our recentRejects filter if we didn't already have it, meaning that it is added at most once, as intended.
2020-10-27Merge #20167: test: Add test for -blockversionWladimir J. van der Laan
fa9b48549ca39b862a10bcfd90e3eac2a0e8ad2e test: Add test for -blockversion (MarcoFalke) fa7fb0e44241982a6e5cd560c06ac0c9d8f47f88 test: Default blockversion to 4 in feature_block (MarcoFalke) fa2b778d0cf723925af8710d52cae211d4f036df test: Remove unused -blockversion from tests (MarcoFalke) Pull request description: `-blockversion` is currently untested, as in: The setting could be made a no-op without any tests failing. Fix that by adding an explicit test for it. Also, related minor cleanups. ACKs for top commit: guggero: ACK fa9b48549ca39b862a10bcfd90e3eac2a0e8ad2e. Tree-SHA512: 1b2e792f7ed0ec1db163476ee8a938f8f7cb3691f797c721bbe55fdeed92487c2ff83b55467440096917999406c86430cb3a615383cefb4f621828309ff6a1e7
2020-10-26test: Add test for -blockversionMarcoFalke
2020-10-22Merge #20112: test: Speed up wallet_resendwallettransactions with ↵MarcoFalke
mockscheduler RPC fa299ac27364bd7a59e6fb7e0c4ce476f2deec40 test: Speed up wallet_resendwallettransactions test with mockscheduler RPC (MarcoFalke) Pull request description: Also fixes #20143 ACKs for top commit: guggero: ACK fa299ac2 Tree-SHA512: 024ced4aa5f5c266e24fd0583d47b45b19c2a6ae25a06fabeacaa0ac996eec0c45f11cc34b2df17d01759b78ed31a991aa86978aafcc76cb0017382f601bf85a
2020-10-22Merge #20176: test: Fix intermittent issue in p2p_feefilterMarcoFalke
fa5a91a352364fe615930f1e7d991671a54ddf2c test: Fix typo (one tx is enough) in p2p_feefilter (MarcoFalke) fa3af2c0d3b3ed185fb8c6105dc2d26dc66632af test: Fix intermittent issue in p2p_feefilter (MarcoFalke) Pull request description: Fixes: ``` Traceback (most recent call last): File "test/functional/test_framework/test_framework.py", line 126, in main self.run_test() File "test/functional/p2p_feefilter.py", line 63, in run_test self.test_feefilter() File "test/functional/p2p_feefilter.py", line 117, in test_feefilter txids = [miniwallet.send_self_transfer(fee_rate=Decimal('0.00020000'), from_node=node1)['wtxid'] for _ in range(3)] File "test/functional/p2p_feefilter.py", line 117, in <listcomp> txids = [miniwallet.send_self_transfer(fee_rate=Decimal('0.00020000'), from_node=node1)['wtxid'] for _ in range(3)] File "test/functional/test_framework/wallet.py", line 63, in send_self_transfer txid = from_node.sendrawtransaction(tx_hex) File "test/functional/test_framework/coverage.py", line 47, in __call__ return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs) File "test/functional/test_framework/authproxy.py", line 146, in __call__ raise JSONRPCException(response['error'], status) test_framework.authproxy.JSONRPCException: bad-txns-inputs-missingorspent (-25) ACKs for top commit: guggero: ACK fa5a91a3 Tree-SHA512: 51d885753f72e1c91c4580709c15bdab60ff8c9d6f9bcb6db78a560e7e4dd7f76ce23add3303b374174afa3f11f74aa61db189a90c68d7f7655b15e64f51ed96
2020-10-22Merge #20039: test: Convert amounts from float to decimalMarcoFalke
5aadd4be1883386a04bef6a04e9a1142601ef7a7 Convert amounts from float to decimal (Prayank) Pull request description: > decimal is preferred in accounting applications https://docs.python.org/3.8/library/decimal.html Decimal type saves an exact value so better than using float. ~~3 variables declared with type as 'Decimal' in [test/functional/mempool_accept.py](https://github.com/bitcoin/bitcoin/blob/master/test/functional/mempool_accept.py): fee, fee_expected, output_amount~~ ~~Not required to convert to string anymore for using the above variables as decimal~~ + fee, fee_expected, output_amount ~~+ 8 decimal places~~ + Using value of coin['amount'] as decimal and removed 'int' + Removed unnecessary parentheses + Remove str() and use quotes Fixes https://github.com/bitcoin/bitcoin/issues/20011 ACKs for top commit: guggero: ACK 5aadd4be1883386a04bef6a04e9a1142601ef7a7 Tree-SHA512: 5877cf3837e5b65bec0fc8909de141a720bfa02a747513e21d20f3c41ec0cfecc524d2c347a96596b0a1a97900da2acf08b799f26b11d537e4dcddc6ce45f38e
2020-10-21test: Fix rpc_net intermittent issueMarcoFalke
2020-10-21Convert amounts from float to decimalPrayank
+ fee, fee_expected, output_amount + Using value of coin['amount'] as decimal and removed 'int' + Removed unnecessary parentheses + Remove str() and use quotes
2020-10-21wallet: Make -wallet setting not create walletsRussell Yanofsky
This changes -wallet setting to only load existing wallets, not create new ones. - Fixes settings.json corner cases reported by sjors & promag: https://github.com/bitcoin-core/gui/issues/95, https://github.com/bitcoin/bitcoin/pull/19754#issuecomment-685858578, https://github.com/bitcoin/bitcoin/pull/19754#issuecomment-685858578 - Prevents accidental creation of wallets reported most recently by jb55 http://www.erisian.com.au/bitcoin-core-dev/log-2020-09-14.html#l-355 - Simplifies behavior after #15454. #15454 took the big step of disabling creation of the default wallet. This PR extends it to avoid creating other wallets as well. With this change, new wallets just aren't created on startup, instead of sometimes being created, sometimes not. #15454 release notes are updated here and are simpler. This change should be targeted for 0.21.0. It's a bug fix and simplifies behavior of the #15937 / #19754 / #15454 features added in 0.21.0.
2020-10-21Merge #20198: Show name, format and if uses descriptors in bitcoin-wallet toolMarcoFalke
fa4074b395a47c54069bd9f598244701505ff11d Show name, format and if uses descriptors in bitcoin-wallet tool (Jonas Schnelli) Pull request description: ACKs for top commit: MarcoFalke: ACK fa4074b395a47c54069bd9f598244701505ff11d jonatack: re-ACK fa4074b395a47c54069bd9f598244701505ff11d Tree-SHA512: cf6ee96ff21532fc4b0ba7a0fdfdc1fa485c9b1495447350fe65cd0bd919e0e0280613933265cdee069b8c29ccf015ac374535a70cac3d4fb89f4d08b3a03519
2020-10-21Show name, format and if uses descriptors in bitcoin-wallet toolJonas Schnelli
2020-10-20test: Move (dis)?connect_nodes globals into TestFramework as helpersElliott Jin
2020-10-20scripted-diff: test: Replace uses of (dis)?connect_nodes globalPrayank
-BEGIN VERIFY SCRIPT- # max-depth=0 excludes test/functional/test_framework/... FILES=$(git grep -l --max-depth 0 "connect_nodes" test/functional) # Replace (dis)?connect_nodes(self.nodes[a], b) with self.(dis)?connect_nodes(a, b) sed -i 's/\b\(dis\)\?connect_nodes(self\.nodes\[\(.*\)\]/self.\1connect_nodes(\2/g' $FILES # Remove imports in the middle of a line sed -i 's/\(dis\)\?connect_nodes, //g' $FILES sed -i 's/, \(dis\)\?connect_nodes//g' $FILES # Remove imports on a line by themselves sed -i '/^\s*\(dis\)\?connect_nodes,\?$/d' $FILES sed -i '/^from test_framework\.util import connect_nodes$/d' $FILES -END VERIFY SCRIPT- Co-authored-by: Elliott Jin <elliott.jin@gmail.com>
2020-10-20test: Replace use of (dis)?connect_nodes globalsElliott Jin
A later scripted-diff commit replaces the majority of uses, which all follow this pattern: (dis)?connect_nodes(self.nodes[a], b) This commit replaces the few "special cases".
2020-10-20Merge #20125: rpc, wallet: Expose database format in getwalletinfoSamuel Dobson
624bab00dd2cc8e2ebd77dc0a669bc8d507c3721 test: add coverage for getwalletinfo format field (Jon Atack) 5e737a009234cbd7cf53748d3d28a2da5221192f rpc, wallet: Expose database format in getwalletinfo (João Barbosa) Pull request description: Support for sqlite based wallets was added in #19077. This PR adds the `format` key in `getwalletinfo` response, that can be `bdb` or `sqlite`. ACKs for top commit: jonatack: Tested ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721 laanwj: Code review ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721. MarcoFalke: doesn't hurt ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721 hebasto: ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721, tested on Linux Mint 20 (x86_64). meshcollider: utACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721 Tree-SHA512: a81f8530f040f6381d33e073a65f281993eccfa717424ab6e651c1203cbaf27794dcb7175570459e7fdaa211565bc060d0a3ecbe70d2b6f9c49b8d5071e4441c
2020-10-19Merge #19624: Warn on unknown rw_settingsMarcoFalke
fa48405ef84985e5a9d38ec38e90d16596ea45b5 Warn on unknown rw_settings (MarcoFalke) Pull request description: Log a warning to debug log if unknown settings are encountered. This should probably only ever happen when the software is upgraded. Something similar is already done for the command line and config file. See: * test: Add test for unknown args #16234 (commit fa7dd88b71a1c6641bd450fae29a4a31849b1afd) ACKs for top commit: ryanofsky: Code review ACK fa48405ef84985e5a9d38ec38e90d16596ea45b5. Looks good and I could see this being helpful for debugging. Thanks for taking suggestions Tree-SHA512: cec7d88adf84fa0a842f56b26245157736eb50df433db951e622ea07fd145b899822b24cdab1d8b36c066415ce4f0ef09b493fa8a8d691532822a59c573aafa7
2020-10-19test: Fix typo (one tx is enough) in p2p_feefilterMarcoFalke
2020-10-18test: Fix intermittent issue in wallet_sendMarcoFalke