aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_basic.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge #15485: add rpc_misc.py, mv test getmemoryinfo, add test mallocinfoMarcoFalke2019-03-011-6/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | f13ad1cae0 modify test for memory locked in case locking pages failed at some point (Adam Jonas) 2fa85ebd1c add rpc_misc.py, mv test getmemoryinfo, add test mallocinfo (Adam Jonas) Pull request description: Creating the `rpc_misc.py` functional test file to add space for adding tests to a file that doesn't have a lot of coverage. - Removing the `getmemoryinfo()` smoke test from wallet basic rather than moving it to keep the wallet decoupled. Feel like testing for reasonable memory allocation values should suffice. - Adding coverage for `mallocinfo()`. Introduced standard lib XML parser since the function exports an XML string that describes the current state of the memory-allocation implementation in the caller. Tree-SHA512: ced30115622916c88d1e729969ee331272ec9f2881eb36dee4bb7331bf633a6810a57fed63a0cfaf86de698edb5162e6a035efd07c89ece1df56b69d61288072
| * add rpc_misc.py, mv test getmemoryinfo, add test mallocinfoAdam Jonas2019-02-261-6/+0
| |
* | Address test todos by removing -txindex to nodes.Amiti Uttarwar2019-02-171-2/+0
| | | | | | | | Originally added when updating getrawtransaction to stop searching unspent utxos.
* | tests: Added missing tests for RPC wallet errorsBen Carman2019-02-111-0/+26
| |
* | Merge #15247: qa: Use wallet to retrieve raw transactionsMarcoFalke2019-02-011-12/+14
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | fa5278a419 qa: Use wallet to retrieve raw transactions (MarcoFalke) fa2198328e qa: Style-only fixes in touched files (MarcoFalke) Pull request description: Instead of asking the coin database and block storage about a transaction, pull it directly from the wallet in wallet related tests. This refactoring only makes sense in light of #15159. <sub>This product may contain minor stylistic cleanups Tree-SHA512: ec34c7150d873da9f19fead3f7e3f758baba5ef10061942384c470a47a6f320690109be9c5160f0c8bc228272a729653d44c78471455337318f657d6c164ba23
| * qa: Use wallet to retrieve raw transactionsMarcoFalke2019-01-261-6/+6
| |
| * qa: Style-only fixes in touched filesMarcoFalke2019-01-251-6/+8
| |
* | [RPC] Update getrawtransaction interfaceAmiti Uttarwar2019-01-261-0/+2
|/
* [tests] Add wallet_balance.pyJohn Newbery2018-11-301-13/+0
| | | | | Adds a test specifically to test the wallet's getbalance and getunconfirmedbalance RPCs.
* Merge #14410: rpcwallet: 'ischange' field for 'getaddressinfo' RPCMarcoFalke2018-11-041-1/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | 14a06525b2 tests: add test for 'getaddressinfo' RPC result 'ischange' field (whythat) 93d1aa9abc rpcwallet: add 'ischange' field to 'getaddressinfo' response (whythat) Pull request description: Implementation of proposal in #14396. This introduces `CWallet::IsChange(CScript&)` method and replaces original `CWallet::IsChange(CTxOut&)` method with overloaded version that delegates to the new method with *txout*'s `scriptPubKey`. In this way `TODO` note from the original method can still be addressed in a single place. Tree-SHA512: ef5dbc82d76b4b9b2fa6a70abc3385a677c55021f79e187ee2f392ee32bc6b406191f4129acae5c17b0206e72b6712e7e0cad574a4bbd966871c2e656c45e041
| * tests: add test for 'getaddressinfo' RPC result 'ischange' fieldwhythat2018-10-131-1/+17
| |
* | [tests] Move deterministic address import to setup_nodesJohn Newbery2018-11-011-4/+3
| | | | | | | | | | | | This requires a small changes to a few tests, but means that deterministic addresses will always be imported (unless setup_nodes behaviour is explicitly overridden).
* | [tests] Small fixups before deprecating generateJohn Newbery2018-10-161-2/+3
|/ | | | | | | | | | | 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
* Merge #13424: Consistently validate txid / blockhash length and encoding in ↵MarcoFalke2018-09-241-1/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rpc calls 5eb20f81d9 Consistently use ParseHashV to validate hash inputs in rpc (Ben Woosley) Pull request description: ParseHashV validates the length and encoding of the string and throws an informative RPC error on failure, which is as good or better than these alternative calls. Note I switched ParseHashV to check string length first, because IsHex tests that the length is even, and an error like: "must be of length 64 (not 63, for X)" is much more informative than "must be hexadecimal string (not X)" in that case. Split from #13420 Tree-SHA512: f0786b41c0d7793ff76e4b2bb35547873070bbf7561d510029e8edb93f59176277efcd4d183b3185532ea69fc0bbbf3dbe9e19362e8017007ae9d51266cd78ae
| * Consistently use ParseHashV to validate hash inputs in rpcBen Woosley2018-08-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | ParseHashV validates the length and encoding of the string and throws an informative RPC error on failure, which is as good or better than these alternative calls. Note I switched ParseHashV to check string length first, because IsHex tests that the length is even, and an error like: "must be of length 64 (not 63, for X)" is much more informative than "must be hexadecimal string (not X)"
* | qa: Run all tests even if wallet is not compiledMarcoFalke2018-09-101-0/+3
| |
* | Update copyright headers to 2018DrahtBot2018-07-271-1/+1
| |
* | Merge #13566: Fix get balancePieter Wuille2018-07-131-0/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 702ae1e21a [RPC] [wallet] allow getbalance to use min_conf and watch_only without accounts. (John Newbery) cf15761f6d [wallet] GetBalance can take a min_depth argument. (John Newbery) 0f3d6e9ab7 [wallet] factor out GetAvailableWatchOnlyBalance() (John Newbery) 7110c830f8 [wallet] deduplicate GetAvailableCredit logic (John Newbery) ef7bc8893c [wallet] Factor out GetWatchOnlyBalance() (John Newbery) 4279da4785 [wallet] GetBalance can take an isminefilter filter. (John Newbery) Pull request description: #12953 inadvertently removed the functionality to call `getbalance "*" <int> <bool>` to get the wallet's balance with either minconfs or include_watchonly. This restores that functionality (when `-deprecatedrpc=accounts`), and also makes it possible to call ``getbalance minconf=<int> include_watchonly=<bool>` when accounts are not being used. Tree-SHA512: 67e84de9291ed6d34b23c626f4dc5988ba0ae6c99708d02b87dd3aaad3f4b6baa6202a66cc2dadd30dd993a39de8036ee920fcaa8cbb1c5dfe606e6fac183344
| * | [RPC] [wallet] allow getbalance to use min_conf and watch_only without accounts.John Newbery2018-06-291-0/+9
| | |
* | | [qa] wallet_basic: Specify minimum required amount for listunspentMarcoFalke2018-06-251-2/+2
|/ /
* | Merge #13160: wallet: Unlock spent outputsWladimir J. van der Laan2018-06-241-0/+9
|\ \ | |/ |/| | | | | | | | | | | | | | | | | fd9b3a71824e33728f267e6f288b6224ad1047e1 test: Output should be unlocked when spent (João Barbosa) 54c3bb4cf805ccee91efb9f8cdadea87e0797989 wallet: Unlock spent outputs (João Barbosa) Pull request description: Fixes #12738. Tree-SHA512: 2c1694727aea0c658d07566c7d11d7afe91218053f84d568fac97413348fa5a977243d6cdeebd1c6550816489e35cb3a31667c8354d9b350de99f979d641d605
| * test: Output should be unlocked when spentJoão Barbosa2018-05-251-0/+9
| |
* | [tests] Remove 'account' API from wallet functional testsJohn Newbery2018-05-021-17/+15
|/ | | | | | | | | | | | | Removes usage of account API from the following functional tests: - wallet_listreceivedby.py - wallet_basic.py - wallet_keypool_topup.py - wallet_txn_clone.py - wallet_listsinceblock.py - wallet_import_rescan.py - wallet_listtransactions.py - wallet_txn_doublespend.py
* [tests] Fix flake8 warnings in several wallet functional testsJohn Newbery2018-05-011-77/+88
| | | | | | | | | | | | | This commit fixes flake8 warnings in the following functional tests: - wallet_listreceivedby.py - wallet_basic.py - wallet_txn_clone.py - wallet_listsinceblock.py - wallet_import_rescan.py - wallet_listtransactions.py - wallet_importprunedfunds.py - wallet_txn_doublspend.py
* [tests] Set -deprecatedrpc=accounts in testsJohn Newbery2018-04-161-5/+6
| | | | | | Future commits will deprecate the accounts RPC methods, arguments and return objects. Set the -deprecatedrpc=accounts switch now so tests don't break in intermediate commits.
* Merge #12716: Fix typos and cleanup in various filesMarcoFalke2018-03-211-1/+1
|\ | | | | | | | | | | | | | | | | | | 4d9b4256d8 Fix typos (Dimitris Apostolou) Pull request description: Unfortunately I messed up my repo while trying to squash #12593 so I created a PR with just the correct fixes. Tree-SHA512: 295d77b51bd2a9381f1802c263de7ffb2edd670d9647391e32f9a414705b3c8b483bb0e469a9b85ab6a70919ea13397fa8dfda2aea7a398b64b187f178fe6a06
| * Fix typosDimitris Apostolou2018-03-211-1/+1
| |
* | test: Use wait_until in tests where time was used for pollingBen Woosley2018-03-151-2/+2
|/
* scripted-diff: change signrawtransaction to signrawtransactionwithwallet in ↵Andrew Chow2018-02-171-3/+3
| | | | | | | | | tests -BEGIN VERIFY SCRIPT- sed -i 's/\<signrawtransaction\>/signrawtransactionwithwallet/g' test/functional/*.py sed -i 's/\<signrawtransaction\>/signrawtransactionwithwallet/g' test/functional/test_framework/*.py -END VERIFY SCRIPT-
* scripted-diff: validateaddress to getaddressinfo in testsAndrew Chow2018-02-161-1/+1
| | | | | | | | | Change all instances of validateaddress to getaddressinfo since it seems that no test actually uses validateaddress for actually validating addresses. -BEGIN VERIFY SCRIPT- find ./test/functional -path '*py' -not -path ./test/functional/wallet_disable.py -not -path ./test/functional/rpc_deprecated.py -not -path ./test/functional/wallet_address_types.py -exec sed -i'' -e 's/validateaddress/getaddressinfo/g' {} \; -END VERIFY SCRIPT-
* Create getaddressinfo RPC and deprecate parts of validateaddressAndrew Chow2018-02-161-1/+10
| | | | | | | | | | | | | Moves the parts of validateaddress which require the wallet into getaddressinfo which is part of the wallet RPCs. Mark those parts of validateaddress which require the wallet as deprecated. Validateaddress will call getaddressinfo for the data that both share for right now. Moves IsMine functions to libbitcoin_common and then links libbitcoin_wallet before libbitcoin_common in order to prevent linker errors since IsMine is no longer used in libbitcoin_server.
* [tests] Rename wallet_* functional tests.Anthony Towns2018-01-251-0/+446