mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-27 07:18:33 +02:00
test: Replace MiniWallet scan_blocks with rescan_utxos
This commit is contained in:
@@ -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']:
|
||||
|
||||
Reference in New Issue
Block a user