Page MenuHomePhabricator

test: use MiniWallet for p2p_filter.py
ClosedPublic

Authored by Fabien on Dec 2 2022, 13:52.

Details

Reviewers
sdulfari
Group Reviewers
Restricted Project
Commits
rABC8937ba594953: test: use MiniWallet for p2p_filter.py
Summary
This 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 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.

Backport of core#23079.

Also cherry-picked a required change from core#22998 that returns the txid from the wallet sendrawtransaction.

Test Plan
ninja check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Dec 2 2022, 13:52

Note to reviewers: lint errors are from the mypy issue fixed in D12726

This revision is now accepted and ready to land.Dec 2 2022, 16:56
Fabien planned changes to this revision.Dec 2 2022, 17:29

Account for the miner fund output

This revision is now accepted and ready to land.Dec 2 2022, 17:42

Don't hardcode the index