mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-05 02:05:10 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user