aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2022-05-09 00:38:17 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2022-05-19 17:53:30 +0200
commit1da5e45725a49a867f7ce16fb37b138ad329d132 (patch)
tree80b30d8e46d3661b9dcfce2e5a34620d3c4d4b6d /test/functional/test_framework
parent59ac8bacd573891d84e8ab96ff43ea12bd266f26 (diff)
downloadbitcoin-1da5e45725a49a867f7ce16fb37b138ad329d132.tar.xz
test: use MiniWallet for feature_dbcrash.py
This test can now be run even with the Bitcoin Core wallet disabled.
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)