aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_basic.py
Commit message (Collapse)AuthorAgeFilesLines
* Generate legacy addresses by defaultRoss Nicoll2021-06-121-1/+1
| | | | Generate legacy addresses instead of SegWit by default.
* Add Dogecoin block subsidiesRoss Nicoll2021-05-301-12/+15
|
* Dogecoin: Update coinbase maturityRoss Nicoll2021-05-201-7/+7
| | | | | | | * Change coinbase maturity to 240 blocks in most cases, with main/test early chains allowing 30 blocks. I've kept the 240 consistent in regtest to avoid having to redesign a lot of the test cases. * Disabled mining unit test which require COINBASE_MATURITY worth of pre-calculated blocks, as we'd otherwise be constantly refactoring them. * Moved functional test which uses the Bitcoin testnet block data as its reference, as it completely breaks as we introduce Dogecoin data. * Updated standard blockchains for tests from 100/200 to 240/480 as appropriate.
* 1.21 key prefix (#1710)Ross Nicoll2021-03-041-3/+3
| | | | | | | | | | | Squash-merged on request. * Dogecoin address prefixes * Use "doge" for BECH32 addresses * Switch Bitcoin references to Dogecoin in Travis * Update addresses in dogecoin-tx tests * Use "doge" for BECH32 addresses * Remove functional tests which do not apply to Dogecoin (backwards compatibility tests do not have suitable clients to test against)
* 1.21 codebase rebrand (#1711)barrystyle2021-02-201-8/+8
| | | | | | | | | | | | | * build: Brand codebase as Dogecoin via automake/autoconf files. * build: Update internal resource files for windows builds. * build: Update internal application names and data directories. * build: Update immediately visible remaining bitcoin name references from cli binaries and qt. * build: Update immediately visible bitcoin references in the main gui itself. * Update functional tests to match Dogecoin * wallet: Add missing check for -descriptors wallet tool option * correct output for functional tests (errorlevels?) Co-authored-by: Ross Nicoll <[email protected]> Co-authored-by: MarcoFalke <[email protected]>
* test: add coverage for passing fee rate as a stringJon Atack2020-12-101-2/+27
| | | | | Github-Pull: #20573 Rebased-From: 6fa72ceb8021c3b5aea62f6cfe92665c29212923
* wallet: Do not treat default constructed types as None-typeMarcoFalke2020-11-191-4/+2
|
* wallet: provide valid values if invalid estimate mode passedJon Atack2020-11-121-2/+2
| | | | Co-authored-by: Murch <[email protected]>
* wallet: update fee rate units, use sat/vB for fee_rate error messagesJon Atack2020-11-121-4/+4
| | | | and BTC/kvB for feeRate error messages.
* wallet: introduce fee_rate (sat/vB) param/optionJon Atack2020-11-111-117/+61
| | | | | | | | | | | | | | | | | | | | | | Create a fee_rate (sat/vB) RPC param and replace overloading the conf_target and estimate_mode params in the following 6 RPCs with it: - sendtoaddress - sendmany - send - fundrawtransaction - walletcreatefundedpsbt - bumpfee In RPC bumpfee, the previously existing fee_rate remains but the unit is changed from BTC/kvB to sat/vB. This is a breaking change, but it should not be an overly risky one, as the units change by a factor of 1e5 and any fees specified in BTC/kvB after this commit will either be too low and raise an error or be 1 sat/vB and can be RBFed. Update the test coverage for each RPC. Co-authored-by: Murch <[email protected]>
* Merge #20220: wallet, rpc: explicit fee rate follow-ups/fixes for 0.21Samuel Dobson2020-11-041-10/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0be29000c011dec0722481dbebb159873da6fa54 rpc: update conf_target helps for correctness/consistency (Jon Atack) 778b9be40667876c705e586849ea9c9e44cf451c wallet, rpc: fix send subtract_fee_from_outputs help (Jon Atack) 603c0050837ec65765208dd54dde354145fbe098 wallet: add rpc send explicit fee rate coverage (Jon Atack) dd341e602d5160fc621c0299179b91403756b61d wallet: add sendtoaddress/sendmany explicit fee rate coverage (Jon Atack) 44e7bfa60313e4ae67da49e5ba4535038b71b453 wallet: add walletcreatefundedpsbt explicit fee rate coverage (Jon Atack) 6e1ea4273e52fdcd86c87628aa595c03a071ca8c test: refactor for walletcreatefundedpsbt fee rate coverage (Jon Atack) 3ac7b0c6f1c68e74a84d868a454f508bada6b09d wallet: fundrawtx fee rate coverage, fixup ParseConfirmTarget() (Jon Atack) 2d8eba8f8425a2515022d51f1f5b4911329fbf55 wallet: combine redundant bumpfee invalid params and args tests (Jon Atack) 1697a40b6f841a54ee0d9744ed7fd09034b0ddad wallet: improve bumpfee error/help, add explicit fee rate coverage (Jon Atack) fc5721723d34f76f9e1ffd2e31f274ea6b22f894 wallet: fix SetFeeEstimateMode() error message (Jon Atack) 052427eef1c9da84c474c5161b1910d3328ef0da wallet, bugfix: fix bumpfee with explicit fee rate modes (Jon Atack) Pull request description: Follow-up to #11413 providing a base to build on for #19543: - bugfix for `bumpfee` raising a JSON error with explicit feerates, fixes issue #20219 - adds explicit feerate test coverage for `bumpfee`, `fundrawtransaction`, `walletcreatefundedpsbt`, `send`, `sendtoaddress`, and `sendmany` - improves a few related RPC error messages and `ParseConfirmTarget()` / error message - fixes/improves the explicit fee rate information in the 6 RPC helps, of which 2 were also missing `conf_target` sat/B units This provides a spec and regression coverage for the potential next step of a universal `sat/vB` feerate argument (see #19543), as well as immediate coverage and minimum fixes for 0.21. ACKs for top commit: kallewoof: Concept/Tested ACK 0be29000c011dec0722481dbebb159873da6fa54 meshcollider: Code review + functional test run ACK 0be29000c011dec0722481dbebb159873da6fa54 Tree-SHA512: efd965003e991cba51d4504e2940f06ab3d742e34022e96a673606b44fad85596aa03a8c1809f06df7ebcf21a38e18a891e54392fe3d6fb4d120bbe4ea0cf5e0
| * wallet: add sendtoaddress/sendmany explicit fee rate coverageJon Atack2020-10-291-6/+19
| |
| * wallet: fix SetFeeEstimateMode() error messageJon Atack2020-10-251-4/+4
| | | | | | | | | | to clarify for the user the confusing error message that the missing fee rate needs to be set in the conf_target param/option.
* | scripted-diff: test: Replace uses of (dis)?connect_nodes globalPrayank2020-10-201-11/+10
|/ | | | | | | | | | | | | | | | | | | | | | -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 <[email protected]>
* doc: Remove double-whitespace from help string, other whitespace fixupsMarcoFalke2020-09-301-4/+5
|
* [test] Make sure send rpc returns fee reasonSishir Giri2020-09-281-0/+12
|
* [send] Make send RPCs return fee reasonSishir Giri2020-09-261-1/+0
|
* test: Fix flaky wallet_basic testFabian Jahr2020-09-051-0/+3
| | | | Co-authored-by: João Barbosa <[email protected]>
* Merge #19671: wallet: Remove -zapwallettxesfanquake2020-09-011-2/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3340dbadd38f5624642cf0e14dddbe6f83a3863b Remove -zapwallettxes (Andrew Chow) Pull request description: It's not clear what use there is to keeping `-zapwallettxes` given that it's intended usage has been superseded by `abandontransaction`. So this removes it outright. Alternative to #19700 ACKs for top commit: meshcollider: utACK 3340dbadd38f5624642cf0e14dddbe6f83a3863b fanquake: ACK 3340dbadd38f5624642cf0e14dddbe6f83a3863b - remaining manpage references will get cleaned up pre-release. Tree-SHA512: 3e58e1ef6f4f94894d012b93e88baba3fb9c2ad75b8349403f9ce95b80b50b0b4f443cb623cf76c355930db109f491b3442be3aa02972e841450ce52cf545fc8
| * Remove -zapwallettxesAndrew Chow2020-08-311-2/+0
| | | | | | | | | | | | -zapwallettxes is made a hidden option to inform users that it is removed and they should be using abandontransaction to do the stuck transaction thing.
* | Merge #18244: rpc: fundrawtransaction and walletcreatefundedpsbt also lock ↵Samuel Dobson2020-08-311-2/+10
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | manually selected coins 6d1f51343cf11b07cd401fbd0c5bc3603e185a0e [rpc] fundrawtransaction, walletcreatefundedpsbt lock manually selected coins (Sjors Provoost) Pull request description: When using `fundrawtransaction` and `walletcreatefundedpsbt` with `lockUnspents`, it would only lock automatically selected coins, not manually selected coins. That doesn't make much sense to me if the goal is to prevent accidentally double-spending yourself before you broadcast a transaction. Note that when creating a transaction, manually selected coins are automatic "unlocked" (or more accurately: the lock is ignored). Earlier versions of this PR introduced an error when a locked coin is manually selected, but this idea was abandoned after some discussion. An application that uses this RPC should either rely on automatic coin selection (with `lockUnspents`) or handle lock concurrency itself with manual coin selection. In particular it needs to make sure to avoid/pause calls with automatic coin selection between calling `lockunspent` and the subsequent spending RPC. See #7518 for historical background. ACKs for top commit: meshcollider: Code review ACK 6d1f51343cf11b07cd401fbd0c5bc3603e185a0e fjahr: Code review ACK 6d1f51343cf11b07cd401fbd0c5bc3603e185a0e Tree-SHA512: 8773c788d92f2656952e1beac147ba9956b8c5132d474e0880e4c89ff53642928b4cbfcd1cb3d17798b9284f02618a8830c93a9f7a4733e5bded96adff1d5d4d
| * [rpc] fundrawtransaction, walletcreatefundedpsbt lock manually selected coinsSjors Provoost2020-08-071-2/+10
| | | | | | | | | | Previously only automatically selected coins were locked when lockUnspents is set. It now also locks selected coins.
* | test: Remove confusing and broken use of wait_until globalMarcoFalke2020-08-151-3/+2
| |
* | refactor: test: use _ variable for unused loop countersSebastian Falbesoner2020-08-061-1/+1
|/ | | | | | substitutes "for x in range(N):" by "for _ in range(N):" indicates to the reader that a block is just repeated N times, and that the loop counter is not used in the body
* Merge #18202: refactor: consolidate sendmany and sendtoaddress codeSamuel Dobson2020-07-121-2/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 08fc6f6cfc3b06fd170452a766696d7b833113fa [rpc] refactor: consolidate sendmany and sendtoaddress code (Sjors Provoost) Pull request description: I consolidated code between these two RPC calls, since `sendtoaddress` is essentially `sendmany` with 1 destination. Unless I overlooked something, the only behaviour change is that some `sendtoaddress` error codes changed from `-4` to `-6`. The release note mentions this. Salvaged from #18201. ACKs for top commit: fjahr: Code review ACK 08fc6f6cfc3b06fd170452a766696d7b833113fa jonatack: ACK 08fc6f6cfc3b06fd170452a766696d7b833113fa meshcollider: Code review & functional test run ACK 08fc6f6cfc3b06fd170452a766696d7b833113fa Tree-SHA512: 7b66c52fa0444a4d02fc3f81d9c2a386794d447616026a30111eda35fb46510475eea6506a9ceda00bb4e0230ebb758da5d236b3ac05c954c044fa68a1e3e909
| * [rpc] refactor: consolidate sendmany and sendtoaddress codeSjors Provoost2020-06-191-2/+5
| | | | | | | | The only new behavior is some error codes are changed from -4 to -6.
* | tests for bumpfee / estimate_modesKarl-Johan Alm2020-06-241-0/+122
|/ | | | | * invalid parameter tests for bumpfee * add tests for no conf_target explicit estimate_modes
* wallet: remove -salvagewalletAndrew Chow2020-05-251-2/+0
|
* test: Fix intermittent sync_blocks failuresMarcoFalke2020-05-051-7/+2
|
* Add a --descriptors option to various testsAndrew Chow2020-04-231-40/+44
| | | | | | | | | | | | | | | Adds a --descriptors option globally to the test framework. This will make the test create and use descriptor wallets. However some tests may not work with this. Some tests are modified to work with --descriptors and run with that option in test_runer: * wallet_basic.py * wallet_encryption.py * wallet_keypool.py * wallet_keypool_topup.py * wallet_labels.py * wallet_avoidreuse.py
* test: remove getaddressinfo label testsJon Atack2020-01-091-1/+1
|
* rpc: simplify getaddressinfo labels, deprecate previous behaviorJon Atack2020-01-031-5/+2
| | | | | | | | | | - change the value returned in the RPC getaddressinfo `labels` field to an array of label name strings - deprecate the previous behavior of returning a JSON hash structure containing label `name` and address `purpose` key/value pairs - update the relevant tests
* tests: Mark functional tests not supporting bitcoin-cli (--usecli) as suchpracticalswift2019-12-061-0/+1
|
* test: add rpc getaddressinfo labels test coverageJon Atack2019-11-241-1/+5
|
* Change default address type to bech32Gregory Sanders2019-09-261-1/+1
|
* test: use named args for sendrawtransaction callsJon Atack2019-09-221-3/+3
| | | | involving more than one argument.
* Merge #16898: test: Remove connect_nodes_biMarcoFalke2019-09-181-11/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fadfd844de8c53034a97dfa6f771ffe9f523fba2 test: Remove unused connect_nodes_bi (MarcoFalke) fa3b9ee8b2280af4bcbcfffff275aaf8dd125929 scripted-diff: test: Replace connect_nodes_bi with connect_nodes (MarcoFalke) faaee1e39a91b3f603881655d3980c29af09852b test: Use connect_nodes when connecting nodes in the test_framework (MarcoFalke) 1111bb91f517838e5b9f778bf6b5a9c8d561e857 test: Reformat python imports to aid scripted diff (MarcoFalke) Pull request description: By default all test nodes are connected in a chain. However, instead of just a single connection between each pair of nodes, we end up with up to four connections for a "middle" node (two outbound, two inbound, from each side). This is generally redundant (tx and block relay should succeed with just a single connection) and confusing. For example, test timeouts after a call to `sync_` may be racy and hard to reproduce. On top of that, the test `debug.log`s are hard to read because txs and block invs may be relayed on the same connection multiple times. Fix this by inlining `connect_nodes_bi` in the two tests that need it, and then replace it with a single `connect_nodes` in all other tests. Historic background: `connect_nodes_bi` has been introduced as a (temporary?) workaround for bug #5113 and #5138, which has long been fixed in #5157 and #5662. ACKs for top commit: laanwj: ACK fadfd844de8c53034a97dfa6f771ffe9f523fba2 jonasschnelli: utACK fadfd844de8c53034a97dfa6f771ffe9f523fba2 - more of less a cleanup PR. promag: Tested ACK fadfd844de8c53034a97dfa6f771ffe9f523fba2, ran extended tests. Tree-SHA512: 2d027a8fd150749c071b64438a0a78ec922178628a7dbb89fd1212b0fa34febd451798c940101155d3617c0426c2c4865174147709894f1f1bb6cfa336aa7e24
| * scripted-diff: test: Replace connect_nodes_bi with connect_nodesMarcoFalke2019-09-171-11/+11
| | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/connect_nodes_bi\(self.nodes,\s*(.),\s*/connect_nodes(self.nodes[\1], /g' $(git grep -l connect_nodes_bi) sed -i --regexp-extended -e 's/connect_nodes_bi(,| )/connect_nodes\1/g' $(git grep -l connect_nodes_bi) -END VERIFY SCRIPT-
* | Merge #16521: rpc: Use the default maxfeerate value as BTC/kBWladimir J. van der Laan2019-09-181-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2dfd6834ef8737e16e4b96df0c459f30a0721d6c test: Add test for default maxfeerate in sendrawtransaction (Joonmo Yang) 261843e4bef96ab296a9775819a99bfa60cad743 wallet/rpc: Use the default maxfeerate value as BTC/kB (Joonmo Yang) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/16382 This patch tries to treat `maxfeerate` in sendrawtransaction/testmempoolaccept RPC as a rate(BTC/kB) instead of an absolute value(BTC). The included test case checks if the new behavior works correctly, by using the transaction with an absolute fee of ~0.02BTC, where the fee rate is ~0.2BTC/kB. This test should be failing if the default `maxfeerate` is 0.1BTC, but pass if the default value is 0.1BTC/kB ACKs for top commit: laanwj: ACK 2dfd6834ef8737e16e4b96df0c459f30a0721d6c (ACKs by Sjors and MarcoFalke above for trivially different code) Tree-SHA512: a1795bffe8a182acef8844797955db1f60bb0c0ded97148f3572dc265234d5219271a3a7aa0b6418a43f73b2b2720ef7412ba169c99bb1cdcac52051f537d6af
| * wallet/rpc: Use the default maxfeerate value as BTC/kBJoonmo Yang2019-08-181-1/+1
| |
* | test: improve gettransaction test coverageJon Atack2019-09-151-3/+28
| | | | | | | | | | | | | | | | - Test gettransaction response without verbose, with verbose=False, and with verbose=True. - In each case, test presence of expected fields in the output, including absence of the "decoded" field when `verbose` is not passed or false. - Test that the "details" field contains the expected receive vout in each case.
* | rpc: fix regression in gettransactionJon Atack2019-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | PR 16866 renamed the 'decode' argument in gettransaction to 'verbose' to make it more consistent with other RPC calls like getrawtransaction. However, it seems it inadvertently overloaded the 'details' fields when 'verbose' is passed. The result is that the original 'details' fields are no longer returned, which seems to be a breaking API change. This PR takes the simplest path to restoring the 'details' fields by renaming them from 'details' back to 'decoded', while leaving the 'verbose' argument for API consistency. It also addresses [this comment](https://github.com/bitcoin/bitcoin/pull/16185#discussion_r320740413) to mention that the 'decoded' field is identical to decoderawtransaction. Update the RPC help, functional test, and release note.
* | [wallet] Rename 'decode' argument in gettransaction method to 'verbose'John Newbery2019-09-131-4/+4
| | | | | | | | | | | | | | | | | | This makes the RPC method consistent with other RPC methods that have a 'verbose' option. Change the name of the return object from 'decoded' to details. Update help text.
* | tests: Add a new functional test for gettransactiondarosior2019-08-301-0/+5
|/
* test: Require standard txs in regtestMarcoFalke2019-06-211-0/+3
|
* test: Remove unused importsMarcoFalke2019-04-091-1/+0
|
* scripted-diff: use self.sync_* methodsMarcoFalke2019-04-091-2/+2
| | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i -e 's/sync_blocks(self.nodes)/self.sync_blocks()/g' $(git grep -l 'sync_blocks(self.nodes)' ./test/functional/*.py) sed -i -e 's/sync_mempools(self.nodes)/self.sync_mempools()/g' $(git grep -l 'sync_mempools(self.nodes)' ./test/functional/*.py) sed -i -e 's/ sync_blocks(/ self.sync_blocks(/g' $(git grep -l sync_blocks ./test/functional/*.py) sed -i -e 's/ sync_mempools(/ self.sync_mempools(/g' $(git grep -l sync_mempools ./test/functional/*.py) -END VERIFY SCRIPT-
* test: Pass at most one node group to sync_allMarcoFalke2019-04-091-17/+17
|
* [rpc] remove resendwallettransactions RPCJohn Newbery2019-03-291-16/+1
| | | | | | | | This RPC was added for testing wallet rebroadcasts. Since we now have a real test for wallet rebroadcasts, it's no longer needed. The call in wallet_basic.py can be removed because wallet_resendwallettransactions.py tests wallet rebroadcast.
* wallet/rpc: add maxfeerate parameter to sendrawtransactionKarl-Johan Alm2019-03-141-2/+2
|