aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_listtransactions.py
AgeCommit message (Collapse)Author
2022-10-28rpc: make `address` field optionalw0xlt
Github-Pull: #26349 Rebased-From: eb679a7896ce00e322972a011b023661766923b9
2022-07-15rpc: Default rbf enabledAndrew Chow
2022-07-13wallet: Enable -walletrbf by defaultAndrew Chow
2021-12-22test: check for invalid listtransactions RPC parametersSebastian Falbesoner
2021-12-06test: remove unneeded sync_all() calls in wallet_listtransactions.pySebastian Falbesoner
2021-12-02test: fix: remove outdated TestNode.generate callsJames O'Beirne
Currently failing on CI. After this change the test itself still fails, but at least it's apparently for a non-incidental reason.
2021-12-02Merge bitcoin/bitcoin#22929: wallet: Automatically add receiving ↵W. J. van der Laan
destinations to the address book 3d71d16d1eb4173c70d4c294559fc2365e189856 test: listtranscations with externally generated addresses (S3RK) d04566415e16ae685af066384f346dff522c068f Add to spends only transcations from me (S3RK) 9f3a622b1cea37e452560f2f82d8e82d3b48a73a Automatically add labels to detected receiving addresses (S3RK) c1b99c088c54eb101c0a28a67237965576ccf5ad Return used destinations from ScriptPubKeyMan::MarkUnusedAddresses (S3RK) 03840c20640685295a65ed8c82456e877f668b9b Add CWallet::IsInternalScriptPubKeyMan (S3RK) 456e350926adde5dabdbc85fc0f017fb29bdadb3 wallet: resolve ambiguity of two ScriptPubKey managers providing same script (S3RK) Pull request description: This PR fixes certain use-cases when **send-to-self** transactions are missing from `listtransactions` output. 1. When a receiving address is generated externally to the wallet (e.g. same wallet running on two nodes, or by 3rd party from xpub) 2. When restoring backup with lost metadata, but keypool gap is not exceeded yet When the block is connected or tx added to mempool we already mark used keys. This PR extends this logic to determine whether the destination is a receiving one and if yes add it to the address book with empty label. Works both for legacy and descriptors wallets. - For legacy it uses the internal flag from the keypool entry. Caveat: because we don't know which script type would be used we add all possible destinations for such keys. - For descriptor wallets it uses internal flag for the script pub key manager. Caveat: it only works for active descriptors. fixes #19856 fixes #20293 ACKs for top commit: laanwj: Code review ACK 3d71d16d1eb4173c70d4c294559fc2365e189856 Tree-SHA512: 03fafd5548ead0c4ffe9ebcc9eb2849f1d2fa7270fda4166419b86877d4e57dcf04460e465fbb9c90b42031f3c05d1b83f1b67a9f82c2a42980825ed1e7b52e6
2021-11-10scripted-diff: Bump copyright headersMarcoFalke
The previous diff touched most files in ./test/, so bump the headers to avoid having to touch them again for a bump later. -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./test/ -END VERIFY SCRIPT-
2021-11-10scripted-diff: Remove redundant sync_all and sync_blocksMarcoFalke
The sync calls are redundant after a call to generate, because generate already syncs itself. -BEGIN VERIFY SCRIPT- perl -0777 -pi -e 's/(generate[^\n]*\)[^\n]*)(\n|\s)+self.sync_(all|blocks)\([^\)]*\)\n/\1\n/g' $(git grep -l generate ./test) -END VERIFY SCRIPT-
2021-10-29test: Implicitly sync after generate*, unless opted outMarcoFalke
2021-10-22Merge bitcoin/bitcoin#23139: rpc: fix "trusted" field in ↵W. J. van der Laan
TransactionDescriptionString(), add coverage 66f6efc70a72cc1613906fd3c10281f9af0ba0db rpc: improve TransactionDescriptionString() "generated" help (Jon Atack) 296cfa312fd9ce19f1f820aeafa37d87764ad21d test: add listtransactions/listsinceblock "trusted" coverage (Jon Atack) d95913fc432f0fde9dec743884b14c5df83727af rpc: fix "trusted" description in TransactionDescriptionString (Jon Atack) Pull request description: The RPC gettransaction, listtransactions, and listsinceblock helps returned by `TransactionDescriptionString()` inform the user that the `trusted` boolean field is only present if the transaction is trusted and safe to spend from. The field is in fact returned by `WalletTxToJSON()` when the transaction has 0 confirmations (or negative confirmations, if conflicted), and it can be true or false. This patch fixes the help, adds test coverage, and touches up the help for the neighboring `generate` field. ACKs for top commit: rajarshimaitra: tACK https://github.com/bitcoin/bitcoin/pull/23139/commits/66f6efc70a72cc1613906fd3c10281f9af0ba0db theStack: Tested ACK 66f6efc70a72cc1613906fd3c10281f9af0ba0db Tree-SHA512: 4c2127765b82780e07bbdbf519d27163d414d9f15598e01e02210f210e6009be344c84951d7274e747b1386991d4c3b082cd25aebe885fb8cf0b92d57178f68e
2021-10-12test: bip125-replaceable in listsinceblockbrunoerg
2021-10-06test: listtranscations with externally generated addressesS3RK
2021-09-29test: add listtransactions/listsinceblock "trusted" coverageJon Atack
2021-09-02scripted-diff: Use generate* from TestFrameworkMarcoFalke
-BEGIN VERIFY SCRIPT- sed --regexp-extended -i \ 's/((self\.)?(nodes\[[^]]+\]|[a-z_]*(wallet|node)[0-9a-z_]*))\.(generate(|toaddress|block|todescriptor)(\(|, ))/self.\5\1, /g' \ $(git grep -l generate ./test | grep -v 'test_framework/' | grep -v 'feature_rbf') -END VERIFY SCRIPT-
2021-07-16test: add logging to wallet_listtransactionsSebastian Falbesoner
Co-authored-by: Jon Atack <jon@atack.com>
2021-07-16test: remove unneeded/redundant code in wallet_listtransactionsSebastian Falbesoner
-> remove unneeded get-out-of IBD generate() (The test framework already sets up the nodes to be out of IBD in setup_nodes(), if setup_clean_chain is not set to True) -> remove duplicate code line assigning an utxo
2021-07-16test: speedup wallet_listtransactions by whitelisting peers (immediate tx relay)Sebastian Falbesoner
By whitelisting the peers via -whitelist, the inventory is transmissioned immediately rather than on average every 5 seconds, speeding up the test by at least a factor of two: before: $ time ./wallet_listtransactions.py ... 0m40.25s real 0m01.74s user 0m01.70s system with this PR: $ time ./wallet_listtransactions.py ... 0m14.93s real 0m01.68s user 0m01.87s system This commit also moves the wallet_listtransactions tests into the < 30s group.
2021-06-21test: introduce `tx_from_hex` helper for tx deserializationSebastian Falbesoner
`FromHex` is mostly used for transactions, so we introduce a shortcut `tx_from_hex` for `FromHex(CTransaction, hex_str)`.
2020-12-31scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
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-04-16rpc: Document all aliases for first arg of listtransactionsMarcoFalke
2019-11-11rpc: Expose block height of wallet transactionsJoão Barbosa
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-03-14wallet/rpc: add maxfeerate parameter to sendrawtransactionKarl-Johan Alm
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: Remove brackets after assertMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/assert ?\((.+)\)(( )*)?(#.*)?$/assert \1\3\3\4/g' $(git grep -l --extended-regexp 'assert ?\(' 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-11-16Fix running individually through test_runner.py, as suggested by @MarcoFalke ↵Kristaps Kaupe
(#14732)
2018-11-13[wallet] Restore ability to list incoming transactions by labelRussell Yanofsky
This change partially reverts #13075 and #14023. Fixes #14382
2018-09-10qa: Run all tests even if wallet is not compiledMarcoFalke
2018-08-13tests: Use explicit importspracticalswift
2018-07-27Update copyright headers to 2018DrahtBot
2018-05-02[tests] Remove 'account' API from wallet functional testsJohn Newbery
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
2018-05-01[tests] Fix flake8 warnings in several wallet functional testsJohn Newbery
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
2018-04-16[tests] Set -deprecatedrpc=accounts in testsJohn Newbery
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.
2018-04-16[tests] Rename rpc_listtransactions.py to wallet_listtransactions.pyJohn Newbery
listtransactions is a wallet RPC. The test name should indicate that this is a wallet test.