1
0

utxo privacy analysis:

- add a new event, 'adb_removed_tx'
 - new wallet method: get_tx_parents
 - number of parents is shown in coins tab
 - detailed list of parents is shown in dialog
This commit is contained in:
ThomasV
2023-01-06 17:24:30 +01:00
parent 77fe2e6421
commit e4273e5ab9
5 changed files with 181 additions and 14 deletions

View File

@@ -349,7 +349,7 @@ class AddressSynchronizer(Logger, EventListener):
self.db.add_transaction(tx_hash, tx)
self.db.add_num_inputs_to_tx(tx_hash, len(tx.inputs()))
if is_new:
util.trigger_callback('adb_added_tx', self, tx_hash)
util.trigger_callback('adb_added_tx', self, tx_hash, tx)
return True
def remove_transaction(self, tx_hash: str) -> None:
@@ -401,6 +401,7 @@ class AddressSynchronizer(Logger, EventListener):
scripthash = bitcoin.script_to_scripthash(txo.scriptpubkey.hex())
prevout = TxOutpoint(bfh(tx_hash), idx)
self.db.remove_prevout_by_scripthash(scripthash, prevout=prevout, value=txo.value)
util.trigger_callback('adb_removed_tx', self, tx_hash, tx)
def get_depending_transactions(self, tx_hash: str) -> Set[str]:
"""Returns all (grand-)children of tx_hash in this wallet."""