test: use MiniWallet for feature_dbcrash.py

This test can now be run even with the Bitcoin Core wallet disabled.
This commit is contained in:
Sebastian Falbesoner committed 2022-05-19 17:53:30 +02:00
1 parent 59ac8bacd5
commit 1da5e45725
2 files changed
+34 -28

No files matched your search

+7
View File
@@ -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)