aboutsummaryrefslogtreecommitdiff
path: root/src/qt/intro.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-05-10 17:50:15 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-05-10 17:50:21 +0200
commitd8ae29ec8f08ad62abd3d831f02d4ddff6aef953 (patch)
tree36e2b5795024541d5f5b55b981d35deb86292e60 /src/qt/intro.cpp
parent32692d26813ba099c1451ae5941d38923bec761c (diff)
parentbd7f27d16dacf6f7de3b4f6bd052def41d9601be (diff)
downloadbitcoin-d8ae29ec8f08ad62abd3d831f02d4ddff6aef953.tar.xz
Merge bitcoin/bitcoin#21900: test: use MiniWallet for feature_csv_activation.py
bd7f27d16dacf6f7de3b4f6bd052def41d9601be refactor: feature_csv_activation.py: move tx helper functions to methods (Sebastian Falbesoner) 2eca46b0aa0ecf4738500b53523d7013985b387d test: use MiniWallet for feature_csv_activation.py (Sebastian Falbesoner) Pull request description: This PR enables one more of the non-wallet functional tests (feature_csv_activation.py) to be run even with the Bitcoin Core wallet disabled by using the new MiniWallet instead, as proposed in #20078. Short reviewers guideline: - Since we exclusively work with anyone-can-spend outputs here (raw scriptPubKey = OP_TRUE), signing is not needed anymore. The function `sign_transaction` and its calls are removed, after changing a tx (e.g. its scriptSig or nVersion) a simple `.rehash()` call is sufficient. Also, generating an address `self.nodeaddress` (and with that, passing it to the the various test tx creation/sending helper methods) is not needed anymore and removed. - The test repeatedly uses the same input for creating different txs (e.g. with different txversions 1 and 2). To let `MiniWallet` create a tx with a specific input, we have to call `.get_utxo()` before which also marks the UTXO as spent. The method is changed to also support keeping the UTXO in its internal list (`mark_as_spent=False`). With the behaviour on master, the second call to `.get_utxo()` with the same input would fail. - To keep the diff in the first commit short, the `miniwallet` is set as a global variable, to avoid passing it on every tx creation/spending helper. The global is eliminated in the second (refactoring) commit, where all the helpers are moved to the test class as methods. By that, we can use `self.nodes[0]` directly in the helpers and don't have to pass it again and again. I think there could still be a lot of improvements/refactoring done in the test, but that should hopefully serve as a good basis. ACKs for top commit: laanwj: Code review ACK bd7f27d16dacf6f7de3b4f6bd052def41d9601be MarcoFalke: review ACK bd7f27d16dacf6f7de3b4f6bd052def41d9601be 🐕 Tree-SHA512: 24fb6a0f7702bae40d5271d197119827067d4b597e954d182e4c1aa5d0fa870368eb3ffed469b26713fa8ff8eb3ecc06abc80b2449cd68156d5559e7ae8a2b11
Diffstat (limited to 'src/qt/intro.cpp')
0 files changed, 0 insertions, 0 deletions