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.
jonatack
commented at 8:49 AM on July 15, 2021:
contributor
ACKc0abfa2d11a3ef847c68ef1a88bb3aa63d6fb7b2 modulo updating the positions of wallet_listtransactions.py --legacy-wallet and wallet_listtransactions.py --descriptors in the test runner from 2m to under 30s (per my testing, the run time drops from ~1m to ~10-15s).
<details><summary>Some quick suggestions for your consideration in the last commit</summary><p>
--- a/test/functional/wallet_listtransactions.py
+++ b/test/functional/wallet_listtransactions.py
@@ -105,19 +105,20 @@ class ListTransactionsTest(BitcoinTestFramework):
self.run_rbf_opt_in_test()
- # Check that the opt-in-rbf flag works properly, for sent and received
- # transactions.
+
def run_rbf_opt_in_test(self):
- # Check whether a transaction signals opt-in RBF itself
+ """Test the opt-in-rbf flag for sent and received transactions."""
+
def is_opt_in(node, txid):
+ """Check whether a transaction signals opt-in RBF itself."""
rawtx = node.getrawtransaction(txid, 1)
for x in rawtx["vin"]:
if x["sequence"] < 0xfffffffe:
return True
return False
- # Find an unconfirmed output matching a certain txid
def get_unconfirmed_utxo_entry(node, txid_to_match):
+ """Find an unconfirmed output matching a certain txid."""
utxo = node.listunspent(0, 0)
for i in utxo:
if i["txid"] == txid_to_match:
@@ -125,7 +126,7 @@ class ListTransactionsTest(BitcoinTestFramework):
return None
self.log.info("Test txs w/o opt-in RBF (bip125-replaceable=no)")
- # Chain a few transactions that don't opt-in.
+ # Chain a few transactions that don't opt in.
txid_1 = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 1)
assert not is_opt_in(self.nodes[0], txid_1)
@@ -205,5 +205,6 @@ class ListTransactionsTest(BitcoinTestFramework):
assert_equal(self.nodes[0].gettransaction(txid_3b)["bip125-replaceable"], "no")
assert_equal(self.nodes[0].gettransaction(txid_4)["bip125-replaceable"], "unknown")
+
if __name__ == '__main__':
ListTransactionsTest().main()
</p></details>
theStack force-pushed on Jul 15, 2021
test: speedup wallet_listtransactions by whitelisting peers (immediate tx relay)
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.
fb6c6a7938
test: remove unneeded/redundant code in wallet_listtransactions
-> 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
47915b1187
test: add logging to wallet_listtransactions
Co-authored-by: Jon Atack <jon@atack.com>
a006d7d730
theStack force-pushed on Jul 15, 2021
theStack
commented at 11:23 PM on July 15, 2021:
contributor
[...] modulo updating the positions of wallet_listtransactions.py --legacy-wallet and wallet_listtransactions.py --descriptors in the test runner from 2m to under 30s (per my testing, the run time drops from ~1m to ~10-15s).
Good idea, done. Put that into the first commit, due to a conflict in test_runner.py I also had to rebase the PR branch.
Some quick suggestions for your consideration in the last commit
Nice, agree that this PR is also a good oportunity to change to docstrings. Took your suggestions and added you as co-author in the last commit.
jonatack
commented at 8:45 PM on July 16, 2021:
contributor
Thanks for updating!
ACKa006d7d73019b8cf4d68626c019c3d69729dda69
kristapsk approved
kristapsk
commented at 12:16 PM on July 20, 2021:
contributor
ACKa006d7d73019b8cf4d68626c019c3d69729dda69
practicalswift
commented at 8:06 PM on July 24, 2021:
contributor
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-05-19 06:53 UTC