test: Replace MiniWallet scan_blocks with rescan_utxos

This commit is contained in:
MarcoFalke
2021-09-17 15:38:38 +02:00
parent 226731ac11
commit fa7e3f1fc1
5 changed files with 7 additions and 14 deletions

View File

@@ -87,13 +87,6 @@ class MiniWallet:
for utxo in res['unspents']:
self._utxos.append({'txid': utxo['txid'], 'vout': utxo['vout'], 'value': utxo['amount']})
def scan_blocks(self, *, start=1, num):
"""Scan the blocks for self._address outputs and add them to self._utxos"""
for i in range(start, start + num):
block = self._test_node.getblock(blockhash=self._test_node.getblockhash(i), verbosity=2)
for tx in block['tx']:
self.scan_tx(tx)
def scan_tx(self, tx):
"""Scan the tx for self._scriptPubKey outputs and add them to self._utxos"""
for out in tx['vout']: