aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-06-01 16:39:36 +0200
committerMacroFake <falke.marco@gmail.com>2022-06-01 16:43:49 +0200
commit9cc010f5a9d7c01ac2bae34194cc5fd2bb8c0275 (patch)
tree815f2d1e7d885e90d2d8b155c62acec7324166bb /test/functional/test_framework
parentdd52f79a73eca18301db1569d517197160018dbb (diff)
parent1da5e45725a49a867f7ce16fb37b138ad329d132 (diff)
downloadbitcoin-9cc010f5a9d7c01ac2bae34194cc5fd2bb8c0275.tar.xz
Merge bitcoin/bitcoin#25087: test: use MiniWallet for feature_dbcrash.py
1da5e45725a49a867f7ce16fb37b138ad329d132 test: use MiniWallet for feature_dbcrash.py (Sebastian Falbesoner) Pull request description: This PR enables one more of the non-wallet functional tests (feature_dbcrash.py) to be run even with the Bitcoin Code wallet by using the MiniWallet instead, as proposed in https://github.com/bitcoin/bitcoin/issues/20078. ACKs for top commit: laanwj: Code review ACK 1da5e45725a49a867f7ce16fb37b138ad329d132 brunoerg: crACK 1da5e45725a49a867f7ce16fb37b138ad329d132 Tree-SHA512: 75ee9a32fd1451254004797d695d18032bd0fcb66ebd88cf737e147e43812525f6e884ec05fcc4f76f566dc71174c8ed7347bcdce16567db6511746ae64cead0
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r--test/functional/test_framework/wallet.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/test_framework/wallet.py b/test/functional/test_framework/wallet.py
index 6901bcfe66..59f981c56f 100644
--- a/test/functional/test_framework/wallet.py
+++ b/test/functional/test_framework/wallet.py
@@ -167,6 +167,13 @@ class MiniWallet:
else:
return self._utxos[index]
+ def get_utxos(self, *, mark_as_spent=True):
+ """Returns the list of all utxos and optionally mark them as spent"""
+ utxos = deepcopy(self._utxos)
+ if mark_as_spent:
+ self._utxos = []
+ return utxos
+
def send_self_transfer(self, **kwargs):
"""Create and send a tx with the specified fee_rate. Fee may be exact or at most one satoshi higher than needed."""
tx = self.create_self_transfer(**kwargs)