aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_bumpfee.py
AgeCommit message (Collapse)Author
2020-04-06test: wallet_bumpfee assertion fixupJon Atack
2020-04-06test: relax bumpfee dust_to_fee txsize an extra vbyteJon Atack
and add explanatory documentation for the reasoning.
2020-03-26rpc: remove deprecated totalFee arg from RPC bumpfeeJon Atack
2020-03-22test: update bumpfee testing from totalFee to fee_rateJon Atack
2020-03-10bumpfee test: exit loop at proper time with new fee value being comparedGregory Sanders
2020-03-10Add some test logging to wallet_bumpfee.pyGregory Sanders
2019-12-18Test watchonly wallet bumpfee with PSBT returnGregory Sanders
Co-authored-by: Sjors Provoost <sjors@sprovoost.nl>
2019-12-01Fix origfee return for bumpfee with feerate argGregory Sanders
2019-11-15Merge #17322: Fix input size assertion in wallet_bumpfee.pyMarcoFalke
38516f9078497d3e8456d48300eca40c35a281f2 Fix input size assertion in wallet_bumpfee.py (Gregory Sanders) Pull request description: I was investigating a curious error for https://github.com/bitcoin/bitcoin/pull/17290 and realized that this check should have caught that error earlier in the test. The loop is intended to ensure that only a single input exists the entire time until the change output disappears, a single additional bump occurs, then it leaves the loop. Top commit has no ACKs. Tree-SHA512: 1d2d6ef535ec2c55f516ee5de11352386ceac6bedaabc6842229a486d9f28d35310ad5f57bfcc1f1e654fc397ecff29ec33256f9b3da897500b7e1635004b63a
2019-11-15Fix input size assertion in wallet_bumpfee.pyGregory Sanders
2019-10-22test: use default address type (bech32) for wallet_bumpfee testsSebastian Falbesoner
The use of native segwit addresses (pure p2wpkh instead of p2sh-p2wpkh) leads to smaller transaction sizes, needing adaption of some constants in the following test cases: - test_dust_to_fee(): adaption of dust calculation (p2wpkh spend estimate of 67 is taken from src/policy/policy.cpp:GetDustThreshold()) - test_maxtxfee_fails(): lowering -maxtxfee setting to trigger fail
2019-10-02Merge #16884: wallet: Change default address type to bech32Wladimir J. van der Laan
71d4eddf42eb5a15e434d2273f11d0a3942ef502 Add release note for bech32 by default in wallet (Gregory Sanders) b34f0180e39fc95d88596a987724b994707e2552 Revert "gui: Generate bech32 addresses by default (take 2, fixup)" (Gregory Sanders) f50785ab56c0c094960c7049cfe9209b101e2823 Change default address type to bech32 (Gregory Sanders) Pull request description: ACKs for top commit: MarcoFalke: re-ACK 71d4eddf42eb5a15e434d2273f11d0a3942ef502 (only change is restore mimick behavior) laanwj: ACK 71d4eddf42eb5a15e434d2273f11d0a3942ef502 Tree-SHA512: 3c49a1b51c49f3a762ad08985167ca1b89b0177ae20ab6d5883f1f74dde7a155921c1b855a842199bbf32f563c56b33f8b603bc842637bdcb121001023d454b6
2019-10-02Merge #16727: wallet: Explicit feerate for bumpfeeWladimir J. van der Laan
c812aba3949b6ab81030dc708cda7c8821be2f70 test bumpfee fee_rate argument (ezegom) 9f25de3d9eb8d012ca1a98cbcd28021e3e1c85ee rpc bumpfee check fee_rate argument (ezegom) 88e5f997dfab3f03bb1ec3f149eaff8dcc2981fe rpc bumpfee: add fee_rate argument (ezegom) 1a4c791cf49ff15aa9deba4388c0180b8f47f15b rpc bumpfee: move feerate estimation logic into separate method (ezegom) Pull request description: Taking over for https://github.com/bitcoin/bitcoin/pull/16492 which seems to have gone inactive. Only minor commit cleanups, rebase, and some help text fixes on top of previous PR. Renamed `feeRate` to `fee_rate` to reflect updated guidelines. ACKs for top commit: Sjors: Code review ACK c812aba laanwj: ACK c812aba3949b6ab81030dc708cda7c8821be2f70 Tree-SHA512: 5f7f51bd780a573ccef1ccd72b0faf3e5d143f6551060a667560c5163f7d9480e17e73775d1d7bcac0463f3b6b4328f0cff7b27e39483bddc42a530f4583ce30
2019-09-30test bumpfee fee_rate argumentezegom
2019-09-26Change default address type to bech32Gregory Sanders
2019-09-17scripted-diff: test: Replace connect_nodes_bi with connect_nodesMarcoFalke
-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-
2019-07-26deprecate totalFee argument in bumpfee RPC callGregory Sanders
2019-07-02wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransactionJoão Barbosa
2019-07-02Merge #15538: wallet_bumpfee.py: Make sure coin selection produces changeWladimir J. van der Laan
276972cb95ba944a7a4b1858a08d333962261396 wallet_bumpfee.py: Make sure coin selection produces change (Gregory Sanders) Pull request description: I was hitting the case where change-less transactions were being made. ACKs for top commit: ryanofsky: utACK 276972cb95ba944a7a4b1858a08d333962261396 Tree-SHA512: e2b7a50363daddd3ee749cacfc9d3d685a6c0c7e3e48118bb60131d205bf83ea06cdd66b69dfa3bd4dbb3bbf2b5b673d7225171486ae72fc762e5dabe2c01ef5
2019-05-08test: Remove True argument to CBlock::serializeMarcoFalke
Unnamed arguments are confusing as to what they mean without looking up the function signature. Since segwit is active by default in regtest, and all blocks are serialized with witness (#15664, c459c5f), remove the argument `with_witness=True` from all calls to `CBlock::serialize` and `BlockTransactions::serialize`. This diff has been created with a script, but is better reviewed without a scripted diff. sed -i --regexp-extended -e 's/block(_?[2a-z]*)\.serialize\([a-z_]*=?True/block\1.serialize(/g' $(git grep -l serialize ./test)
2019-04-15Merge #15557: Enhance `bumpfee` to include inputs when targeting a feerateMeshCollider
184f8785f wallet_bumpfee.py: add test for change key preservation (Gregory Sanders) d08becff8 add functional tests for feerate bumpfee with adding inputs (Gregory Sanders) 0ea47ba7b generalize bumpfee to add inputs when needed (Gregory Sanders) Pull request description: When targeting a feerate using `bumpfee`, call a new function that directly uses `CWallet::CreateTransaction` and coin control to get the desired result. This allows us to get a superset of previous behavior, with an arbitrary RBF bump of a transaction provided it passes the preconditional checks and spare confirmed utxos are available. Note(s): 0) The coin selection will use knapsack solver for the residual selection. 1) This functionality, just like knapsack coin selection in general, will hoover up negative-value inputs when given the chance. 2) Newly added inputs must be confirmed due to current Core policy. See error: `replacement-adds-unconfirmed` 3) Supporting this with `totalFee` is difficult since the "minimum total fee" option in `CreateTransaction` logic was (rightly)taken out in #10390 . ACKs for commit 184f87: jnewbery: utACK 184f8785f710d58d9ef82e611591c9cbff5ab89d Tree-SHA512: fb6542bdfb2c6010e328ec475cf9dcbff4eb2b1a1b27f78010214534908987a5635797196fa05edddffcbcf2987335872dc644a99261886d5cbb34a8f262ad3e
2019-04-11wallet_bumpfee.py: add test for change key preservationGregory Sanders
2019-04-11add functional tests for feerate bumpfee with adding inputsGregory Sanders
2019-04-09test: Remove unused importsMarcoFalke
2019-04-09scripted-diff: use self.sync_* methodsMarcoFalke
-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-
2019-04-09test: Pass self to test_simple_bumpfee_succeedsMarcoFalke
Needed for a future scripted diff
2019-03-05wallet_bumpfee.py: Make sure coin selection produces changeGregory Sanders
2019-03-02scripted-diff: Update copyright in ./testMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./test/ -END VERIFY SCRIPT-
2019-03-02scripted-diff: test: Use py3.5 bytes::hex() methodMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i -e "s/def bytes_to_hex_str/def b_2_x/g" $(git grep -l bytes_to_hex_str) export RE_B_0="[^()]*" # match no bracket export RE_B_1="${RE_B_0}\(${RE_B_0}\)${RE_B_0}" # match exactly one () export RE_B_2="${RE_B_0}\(${RE_B_1}\)${RE_B_0}" # match wrapped (()) export RE_M="(b2x|bytes_to_hex_str)\(((${RE_B_0}|${RE_B_1}|${RE_B_2})*)\)" sed -i --regexp-extended -e "s/${RE_M}/\2.hex()/g" $(git grep -l -E '(b2x|bytes_to_hex_str)') sed -i --regexp-extended -e "/ +bytes_to_hex_str( as b2x)?,/d" $(git grep -l bytes_to_hex_str) sed -i --regexp-extended -e "s/ +bytes_to_hex_str( as b2x)?,//g" $(git grep -l bytes_to_hex_str) sed -i --regexp-extended -e "s/, bytes_to_hex_str( as b2x)?//g" $(git grep -l bytes_to_hex_str) export RE_M="(binascii\.)?hexlify\(((${RE_B_0}|${RE_B_1}|${RE_B_2})*)\).decode\(${RE_B_0}\)" sed -i --regexp-extended -e "s/${RE_M}/\2.hex()/g" $(git grep -l hexlify -- ':(exclude)share') sed -i --regexp-extended -e "/from binascii import hexlify$/d" $(git grep -l hexlify -- ':(exclude)share') sed -i --regexp-extended -e "s/(from binascii import) .*hexlify/\1 unhexlify/g" $(git grep -l hexlify -- ':(exclude)share') sed -i -e 's/ignore-names "/ignore-names "b_2_x,/g' ./test/lint/lint-python-dead-code.sh -END VERIFY SCRIPT-
2018-09-23[test] Remove deprecated addwitnessaddress from wallet_bumpfee.pyJohn Newbery
2018-09-23[test] Fix flake8 warnings in testsJohn Newbery
Fix all flake8 warnings in tests that are about to be updated to remove addwitnessaddress
2018-09-14Merge #12493: [wallet] Reopen CDBEnv after encryption instead of shutting downWladimir J. van der Laan
c1dde3a949b36ce9c2155777b3fa1372e7ed97d8 No longer shutdown after encrypting the wallet (Andrew Chow) d7637c5a3f1d62922594cdfb6272e30dacf60ce9 After encrypting the wallet, reload the database environment (Andrew Chow) 5d296ac810755dc47f105eb95b52b7e2bcb8aea8 Add function to close all Db's and reload the databae environment (Andrew Chow) a769461d5e37ddcb771ae836254fdc69177a28c4 Move BerkeleyEnvironment deletion from internal method to callsite (Andrew Chow) Pull request description: This is the replacement for #11678 which implements @ryanofsky's [suggestion](https://github.com/bitcoin/bitcoin/pull/11678#pullrequestreview-76464511). Shutting down the software was to prevent the BDB environment from writing unencrypted private keys to disk in the database log files, as was noted [here](https://bitcointalk.org/index.php?topic=51474.msg616068#msg616068). This PR replaces the shutdown behavior with a CDBEnv flush, close, and reopen which achieves the same effect: everything is cleanly flushed and closed, the log files are removed, and then the environment reopened to continue normal operation. To ensure that no unencrypted private keys are in the log files after encrypting the wallet, I wrote [this script](https://gist.github.com/achow101/7f7143e6c3d3fdc034d3470e72823e9d) to pull private keys from the original wallet file and searches for these keys in the log files (note that you will have to change your file paths to make it work on your own machine). As for concerns about private keys being written to slack space or being kept in memory, these behaviors no longer exist after the original wallet encryption PR and the shutting down solution from 2011. cc @ryanofsky Tree-SHA512: 34b894283b0677a873d06dee46dff8424dec85a2973009ac9b84bcf3d22d05f227c494168c395219d9aee3178e420cf70d4b3eeacc9785aa86b6015d25758e75
2018-09-10qa: Run all tests even if wallet is not compiledMarcoFalke
2018-08-21test: Check RPC settxfee errorsJoão Barbosa
2018-08-13tests: Use explicit importspracticalswift
2018-08-09No longer shutdown after encrypting the walletAndrew Chow
Since the database environment is flushed, closed, and reopened during EncryptWallet, there is no need to shut down the software anymore.
2018-07-27Update copyright headers to 2018DrahtBot
2018-05-29policy: Treat segwit as always activeMarcoFalke
2018-04-10Merge #12749: [wallet] feebumper: discard change outputs below discard rateWladimir J. van der Laan
f526046 adapt bumpfee change discard test to be more strict and add note on p2sh discrep (Gregory Sanders) 5805d6f feebumper: discard change outputs below discard rate (Gregory Sanders) Pull request description: The "discard rate" is the concept we use to ensure the wallet isnt creating not so useful just-above-relay dust. Outside of bumpfee previous to this PR, and manually creating such an output, the wallet will never make change outputs of that size, preferring to send them to fees instead. "Worst case" for the user is that users pay a slightly higher feerate than they were expecting, which is already a possibility with relay dust. Tree-SHA512: dd69351810dc1709437602e7db1be46e4e905ccd8e16d03952de8b4c1fdbf9cb7e6c99968930896baf6b5c7cb005a03ec0506a2669d22e21e32982e60329606b
2018-03-28adapt bumpfee change discard test to be more strict and add note on p2sh discrepGregory Sanders
2018-03-24rpc: Add testmempoolacceptMarcoFalke
2018-02-17scripted-diff: change signrawtransaction to signrawtransactionwithwallet in ↵Andrew Chow
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-
2018-02-16scripted-diff: validateaddress to getaddressinfo in testsAndrew Chow
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-
2018-02-06wallet: Disallow abandon of conflicted txesMarcoFalke
2018-01-25[tests] Rename wallet_* functional tests.Anthony Towns