aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_importdescriptors.py
AgeCommit message (Collapse)Author
2022-08-18test: speedup wallet tests by whitelisting peers (immediate tx relay)Sebastian Falbesoner
2022-07-18Merge bitcoin/bitcoin#25351: rpc, wallet: Scan mempool after import* - ↵Andrew Chow
Second attempt 1be796418934ae7370cb0ed501877db59e738106 test, wallet: Add mempool rescan test for import RPCs (Fabian Jahr) 833ce76df712932c19e99737e87b5569e2bca34b rpc, wallet: Document mempool rescan after importdescriptor, importwallet (Fabian Jahr) 0e396d1ba701c9ac6280a98bf37f53352167e724 rpc, wallet: Document mempool scan after importmulti (Fabian Jahr) e6d3ef85867545a5a66a211e35e818e8a1b166fa rpc, wallet: Document mempool scan after importpubkey (Fabian Jahr) 6d3db52e667474b6c0c2e4eeb9fb5b3ba4063205 rpc, wallet: Document and test mempool scan after importprivkey (João Barbosa) 3abdbbb90a4a8f2041fec37506268e66a0b3eb31 rpc, wallet: Document and test mempool scan after importaddress (João Barbosa) 236239bd40ae1175537fc932df5af27902326329 wallet: Rescan mempool for transactions as well (Fabian Jahr) Pull request description: This PR picks up the work from #18964 and closes #18954. It should incorporate all the unaddressed feedback from the PR: - Mempool rescan now expanded to all relevant import* RPCs - Added documentation in the help of each RPC - More tests ACKs for top commit: Sjors: re-utACK 1be796418934ae7370cb0ed501877db59e738106 (only a test change) achow101: ACK 1be796418934ae7370cb0ed501877db59e738106 w0xlt: reACK https://github.com/bitcoin/bitcoin/pull/25351/commits/1be796418934ae7370cb0ed501877db59e738106 Tree-SHA512: b62fed5f97c6c242b2af417b41c9696a1f18878483d9e1c9429791f9c05257f57a00540a9a84df23c49faf6a61c3109c22972de81540083f38b506217804fcc5
2022-07-03wallet: Rescan mempool for transactions as wellFabian Jahr
2022-06-26test: Remove unnecessary block mining from importdescriptors testFabian Jahr
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-11-10test: Use 4 spaces for indentationMarcoFalke
2021-10-21Merge bitcoin/bitcoin#23287: test: get and decode tx with a single ↵MarcoFalke
`gettransaction` RPC call 130ee481082d2612d452d7d69131ade935b225b5 test: get and decode tx with a single `gettransaction` RPC call (Sebastian Falbesoner) Pull request description: Rather than subsequently calling `gettransaction` and `decoderawtransaction` to get the decoded information for a specific tx-id, we can simply use the verbose version of `gettransaction`, which returns this in a 'decoded' key. I.e. ``` node.decoderawtransaction(node.gettransaction(txid)['hex']) ``` can simply be replaced by: ``` node.gettransaction(txid=txid, verbose=True)['decoded'] ``` Rationale: shorter code, shorter test logs, less RPC calls. ACKs for top commit: stratospher: tested ACK 130ee48 amadeuszpawlik: tACK 130ee481082d2612d452d7d69131ade935b225b5 lsilva01: Tested ACK 130ee48 on Ubuntu 20.04. shaavan: ACK 130ee481082d2612d452d7d69131ade935b225b5 Tree-SHA512: cf0bd26e1e21b8022fb8062857906e0706f0ee32d3277f985c461e2519405afe445ab005f5f763fb268c7b4d6e48b2d47eda7af8621b3bce67cece8dfc9bc153
2021-10-17test: get and decode tx with a single `gettransaction` RPC callSebastian Falbesoner
Rather than subsequently calling `gettransaction` and `decoderawtransaction` to get the decoded information for a specific tx-id, we can simply use the verbose version of `gettransaction`, which returns this in a 'decoded' key. I.e. node.decoderawtransaction(node.gettransaction(txid)['hex']) can be replaced by: node.gettransaction(txid=txid, verbose=True)['decoded']
2021-10-06test: Use generate* node RPC, not wallet RPCMarcoFalke
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-08-19Use generate* from TestFrameworkMarcoFalke
The changes in feature_rbf can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2021-06-28wallet: deactivate descriptorS3RK
2021-06-28test: wallet importdescriptors update existingS3RK
2021-06-28wallet: allow to import same descriptor twiceS3RK
2021-05-31Use COINBASE_MATURITY constant in functional tests.Kiminuo
2021-04-28test/functional: standardness sanity checks for P2(W)SH multisigAntoine Poinsot
Note that it also test for sortedmulti(), which the previous commit didn't. Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-12-31scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-11-09Merge #20153: wallet: do not import a descriptor with hardened derivations ↵Wladimir J. van der Laan
into a watch-only wallet 538be4219ae7e65862e4aff540af88c9421e6061 wallet: fix importdescriptor silent fail (Ivan Metlushko) Pull request description: Currently `importdescriptor` command will successfully import a descriptor with hardened derivations into a watch-only wallet while silently failing to expand the descriptor to fill the cache. This leads to a broken wallet state and failure to load such wallet due to missing cache on subsequent restart. ACKs for top commit: laanwj: Code review ACK 538be4219ae7e65862e4aff540af88c9421e6061 achow101: ACK 538be4219ae7e65862e4aff540af88c9421e6061 meshcollider: utACK 538be4219ae7e65862e4aff540af88c9421e6061 Tree-SHA512: 4bdd0ab4437d55b3f1a79c3a300a0b186089155c020fe220a73d0cce274de47d90371d88918d39fd795f9fccf8db328f1e322d29a6062f9ce94a1c254398f004
2020-11-09Merge #20266: wallet: fix change detection of imported internal descriptorsWladimir J. van der Laan
bd93fc9945bfd4be117990c5d861f61ddd451f96 Fix change detection of imported internal descriptors (Andrew Chow) Pull request description: Import internal descriptors were having address book entries added which meant they would be detected as non-change. Fix this and add a test for it. ACKs for top commit: laanwj: Code review ACK bd93fc9945bfd4be117990c5d861f61ddd451f96 meshcollider: utACK bd93fc9945bfd4be117990c5d861f61ddd451f96 promag: Code review ACK bd93fc9945bfd4be117990c5d861f61ddd451f96. Tree-SHA512: 8fa9e364be317627ec171eedffdb505976c0e7f1e55bc7e8cfdffa3aeea5db24d231f55166602cd0e97a5ba621acc871de0a765c75d0c65678f83e93c3b657c5
2020-11-01Avoid creating legacy wallets in wallet_importdescriptors.pyAndrew Chow
2020-10-29Fix change detection of imported internal descriptorsAndrew Chow
2020-10-29Skip --descriptor tests if sqlite is not compiledAndrew Chow
2020-10-15wallet: fix importdescriptor silent failIvan Metlushko
2020-07-03walletdb: don't reinitialize desc cache with multiple cache entriesAndrew Chow
When loading descriptor caches, we would accidentally reinitialize the descriptor cache when seeing that one already exists. This should have only been initializing the cache when one does not exist. However this code itself is unnecessary as the act of looking up the cache to add to it will initialize it if it didn't already exist. This issue could be hit by trying to load a wallet that had imported a multisig descriptor. The wallet would fail to load. A test has been added to wallet_importdescriptors.py to catch this case. Another test case has also been added to check that loading a wallet with only single key descriptors works.
2020-04-28tests: Add missing sync_all to wallet_importdescriptors.pyAndrew Chow
node1 will sometimes do sendtoaddress before it has received a funding transaction which will cause the test to fail. sync_all to ensure it gets the transaction first.
2020-04-23add importdescriptors RPC and tests for native descriptor walletsHugo Nguyen
Co-authored-by: Andrew Chow <achow101-github@achow101.com>