send_to
is introduced first, which allows to create arbitrary outputs (scriptPubKey/amount). Note that the implementation for this is already present in feature_rbf.py (recently added in PR #22998), i.e. it is simply moved to the MiniWallet interface.
test: use MiniWallet for p2p_filter.py #23079
pull theStack wants to merge 3 commits into bitcoin:master from theStack:202109-test-use_MiniWallet_for_p2p_filter changing 3 files +50 −30-
theStack commented at 1:24 am on September 24, 2021: memberThis PR enables one more of the non-wallet functional tests (p2p_filter.py) to be run even with the Bitcoin Core wallet disabled by using the MiniWallet instead, as proposed in #20078. For this purpose, a MiniWallet method
-
fanquake added the label Tests on Sep 24, 2021
-
in test/functional/p2p_filter.py:40 in 3fe3d37303 outdated
35+ 36+ 37+def random_p2wpkh(): 38+ key = ECKey() 39+ key.generate() 40+ return key_to_p2wpkh_script(key.get_pubkey().get_bytes())
Shubhankar-Gambhir commented at 5:52 am on September 24, 2021:wouldn’t it be better to add this function in miniwallet? then if required it can be used in other tests as well.
theStack commented at 3:31 pm on September 24, 2021:Good idea, done. Note though that I didn’t put it directly into the MiniWallet class (since it doesn’t need any of its internal state), but as global function into the test_framework/wallet.py module.theStack force-pushed on Sep 24, 2021test: MiniWallet: add `send_to` method to create arbitrary txouts
With this new method, outputs to an arbitrary scriptPubKey/amount can be created. Note that the implementation was already present in the test feature_rbf.py and is just moved to the MiniWallet interface, in order to enable other tests to also use it.
test: introduce helper to create random P2WPKH scriptPubKeys 6fc2cd3f09test: use MiniWallet for p2p_filter.py
This test can now be run even with the Bitcoin Core wallet disabled.
theStack force-pushed on Sep 27, 2021theStack commented at 11:57 am on September 27, 2021: memberRebased on master to (hopefully) get rid of the Windows CI failure.laanwj commented at 3:19 pm on September 28, 2021: memberCode review ACK cfdb6baa22b8eb526fcbe1e5131bf4a3fd0cd672DrahtBot commented at 7:25 pm on September 28, 2021: memberThe following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #23118 (test: refactor: introduce
script_util
helper for creating P2PK scripts by theStack)
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.
MarcoFalke merged this on Sep 29, 2021MarcoFalke closed this on Sep 29, 2021
sidhujag referenced this in commit c333dd03dc on Sep 29, 2021DrahtBot locked this on Oct 30, 2022
github-metadata-mirror
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: 2024-11-26 06:12 UTC
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: 2024-11-26 06:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me