From 1da5e45725a49a867f7ce16fb37b138ad329d132 Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Mon, 9 May 2022 00:38:17 +0200 Subject: test: use MiniWallet for feature_dbcrash.py This test can now be run even with the Bitcoin Core wallet disabled. --- test/functional/test_framework/wallet.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/functional/test_framework') 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) -- cgit v1.2.3