This avoids having to fiddle with the start and num parameters and instead use the scantxoutset RPC functionality via rescan_utxos.
test: Replace MiniWallet scan_blocks with rescan_utxos #23017
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2109-testMiniWalletCleanup changing 5 files +7 −14-
MarcoFalke commented at 1:24 PM on September 17, 2021: member
- MarcoFalke force-pushed on Sep 17, 2021
- fanquake added the label Tests on Sep 17, 2021
-
theStack commented at 2:36 PM on September 17, 2021: member
Concept ACK
-
DrahtBot commented at 1:53 AM on September 18, 2021: member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #22867 (test: Extend test coverage of BIP125 and document confusing/inconsistent behavior by mjdietzx)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
in test/functional/mempool_spend_coinbase.py:38 in fa1b53f2d0 outdated
37 | - utxo_mature = wallet.get_utxo() 38 | - wallet.scan_blocks(start=chain_height - 100 + 2, num=1) 39 | - utxo_immature = wallet.get_utxo() 40 | + coinbase_txid = lambda h: self.nodes[0].getblock(self.nodes[0].getblockhash(chain_height - 100 + h))['tx'][0] 41 | + utxo_mature = wallet.get_utxo(txid=coinbase_txid(1)) 42 | + utxo_immature = wallet.get_utxo(txid=coinbase_txid(2))
theStack commented at 10:43 AM on September 19, 2021:nit, feel free to ignore: For increased readability, I'd rather prefer explicitely passing the absolute heights here, instead of putting magic into the lambda.
MarcoFalke commented at 6:31 AM on September 20, 2021:Thanks, done.
theStack approvedtheStack commented at 10:46 AM on September 19, 2021: memberACK fa1b53f2d0532bbfa7982adfecaf84cdb59c8461 🍵
test: Replace MiniWallet scan_blocks with rescan_utxos fa7e3f1fc1MarcoFalke force-pushed on Sep 20, 2021theStack approvedtheStack commented at 6:58 AM on September 20, 2021: memberre-ACK fa7e3f1fc114056967963a4ad4863a56e406c57e
Shubhankar-Gambhir commented at 8:45 PM on September 20, 2021: contributorACK fa7e3f1, all tests were succesfull
<details> <summary>feature_rbf.py</summary>
2021-09-20T20:29:57.177000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_6g5k6jja 2021-09-20T20:30:17.444000Z TestFramework (INFO): Running test simple doublespend... 2021-09-20T20:30:17.526000Z TestFramework (INFO): Running test doublespend chain... 2021-09-20T20:30:18.062000Z TestFramework (INFO): Running test doublespend tree... 2021-09-20T20:30:21.464000Z TestFramework (INFO): Running test replacement feeperkb... 2021-09-20T20:30:22.338000Z TestFramework (INFO): Running test spends of conflicting outputs... 2021-09-20T20:30:24.562000Z TestFramework (INFO): Running test new unconfirmed inputs... 2021-09-20T20:30:25.733000Z TestFramework (INFO): Running test too many replacements... 2021-09-20T20:30:27.604000Z TestFramework (INFO): Running test opt-in... 2021-09-20T20:30:28.917000Z TestFramework (INFO): Running test RPC... 2021-09-20T20:30:35.362000Z TestFramework (INFO): Running test prioritised transactions... 2021-09-20T20:30:50.683000Z TestFramework (INFO): Running test no inherited signaling... 2021-09-20T20:30:50.716000Z TestFramework (INFO): Check that the child tx can still be replaced (via a tx that also replaces the parent) 2021-09-20T20:30:50.722000Z TestFramework (INFO): Running test replacement relay fee... 2021-09-20T20:30:50.726000Z TestFramework (INFO): Passed 2021-09-20T20:30:50.777000Z TestFramework (INFO): Stopping nodes 2021-09-20T20:30:58.614000Z TestFramework (INFO): Cleaning up /tmp/bitcoin_func_test_6g5k6jja on exit 2021-09-20T20:30:58.614000Z TestFramework (INFO): Tests successful</details>
<details> <summary>mempool_reorg.py</summary>
2021-09-20T20:11:58.347000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_raz1f_0t 2021-09-20T20:12:16.412000Z TestFramework (INFO): Add 4 coinbase utxos to the miniwallet 2021-09-20T20:12:19.429000Z TestFramework (INFO): Create three transactions spending from coinbase utxos: spend_1, spend_2, spend_3 2021-09-20T20:12:19.438000Z TestFramework (INFO): Create another transaction which is time-locked to two blocks in the future 2021-09-20T20:12:19.442000Z TestFramework (INFO): Check that the time-locked transaction is too immature to spend 2021-09-20T20:12:19.655000Z TestFramework (INFO): Broadcast and mine spend_2 and spend_3 2021-09-20T20:12:19.668000Z TestFramework (INFO): Generate a block 2021-09-20T20:12:19.674000Z TestFramework (INFO): Check that time-locked transaction is still too immature to spend 2021-09-20T20:12:19.676000Z TestFramework (INFO): Create spend_2_1 and spend_3_1 2021-09-20T20:12:19.682000Z TestFramework (INFO): Broadcast and mine spend_3_1 2021-09-20T20:12:19.685000Z TestFramework (INFO): Generate a block 2021-09-20T20:12:19.700000Z TestFramework (INFO): The time-locked transaction can now be spent 2021-09-20T20:12:19.702000Z TestFramework (INFO): Add spend_1 and spend_2_1 to the mempool 2021-09-20T20:12:20.722000Z TestFramework (INFO): invalidate the last block 2021-09-20T20:12:20.729000Z TestFramework (INFO): The time-locked transaction is now too immature and has been removed from the mempool 2021-09-20T20:12:20.730000Z TestFramework (INFO): spend_3_1 has been re-orged out of the chain and is back in the mempool 2021-09-20T20:12:20.732000Z TestFramework (INFO): Use invalidateblock to re-org back and make all those coinbase spends immature/invalid 2021-09-20T20:12:20.768000Z TestFramework (INFO): Check that the mempool is empty 2021-09-20T20:12:20.826000Z TestFramework (INFO): Stopping nodes 2021-09-20T20:12:26.103000Z TestFramework (INFO): Cleaning up /tmp/bitcoin_func_test_raz1f_0t on exit 2021-09-20T20:12:26.104000Z TestFramework (INFO): Tests successful</details>
<details> <summary>mempool_spend_coinbase.py </summary>
2021-09-20T20:13:25.574000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_hxheqe3j 2021-09-20T20:13:29.098000Z TestFramework (INFO): Stopping nodes 2021-09-20T20:13:29.503000Z TestFramework (INFO): Cleaning up /tmp/bitcoin_func_test_hxheqe3j on exit 2021-09-20T20:13:29.504000Z TestFramework (INFO): Tests successful</details>
<details> <summary> rpc_blockchain.py</summary>
2021-09-20T20:15:13.694000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_atozw1v4 2021-09-20T20:15:20.477000Z TestFramework (INFO): Generate 200 blocks after the genesis block in ten-minute steps 2021-09-20T20:15:30.242000Z TestFramework (INFO): Test getblockchaininfo 2021-09-20T20:15:40.739000Z TestFramework (INFO): Test getchaintxstats 2021-09-20T20:15:40.925000Z TestFramework (INFO): Test gettxoutsetinfo works for blockchain with just the genesis block 2021-09-20T20:15:41.577000Z TestFramework (INFO): Test gettxoutsetinfo returns the same result after invalidate/reconsider block 2021-09-20T20:15:42.616000Z TestFramework (INFO): Test gettxoutsetinfo hash_type option 2021-09-20T20:15:43.059000Z TestFramework (INFO): Test getblockheader 2021-09-20T20:15:43.071000Z TestFramework (INFO): Test getdifficulty 2021-09-20T20:15:43.072000Z TestFramework (INFO): Test getnetworkhashps 2021-09-20T20:15:43.073000Z TestFramework (INFO): Test stopping at height 2021-09-20T20:15:47.561000Z TestFramework (INFO): Test waitforblockheight 2021-09-20T20:15:47.937000Z TestFramework (INFO): Test getblock with verbosity 1 doesn't include fee 2021-09-20T20:15:47.941000Z TestFramework (INFO): Test getblock with verbosity 2 includes expected fee 2021-09-20T20:15:47.945000Z TestFramework (INFO): Test getblock with verbosity 2 still works with pruned Undo data 2021-09-20T20:15:47.945000Z TestFramework (INFO): Test getblock with invalid verbosity type returns proper error message 2021-09-20T20:15:48.059000Z TestFramework (INFO): Stopping nodes 2021-09-20T20:15:49.418000Z TestFramework (INFO): Cleaning up /tmp/bitcoin_func_test_atozw1v4 on exit 2021-09-20T20:15:49.418000Z TestFramework (INFO): Tests successful</details>
Shubhankar-Gambhir approvedMarcoFalke merged this on Sep 21, 2021MarcoFalke closed this on Sep 21, 2021MarcoFalke deleted the branch on Sep 21, 2021sidhujag referenced this in commit 245e861023 on Sep 21, 2021DrahtBot locked this on Oct 30, 2022ContributorsLabels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-27 00:14 UTC
More mirrored repositories can be found on mirror.b10c.me