mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-19 20:20:00 +01:00
Merge bitcoin/bitcoin#25087: test: use MiniWallet for feature_dbcrash.py
1da5e45725test: 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 ACK1da5e45725brunoerg: crACK1da5e45725Tree-SHA512: 75ee9a32fd1451254004797d695d18032bd0fcb66ebd88cf737e147e43812525f6e884ec05fcc4f76f566dc71174c8ed7347bcdce16567db6511746ae64cead0
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