URI: 
       twallet: move get_depending_transactions to AddressSynchronizer - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit f7166e95c4119e67667dbda7fe573b3147b7bce7
   DIR parent b7178f2d21c96ba483894a2f70ea2ef27e5a2182
  HTML Author: SomberNight <somber.night@protonmail.com>
       Date:   Tue, 14 Aug 2018 21:53:05 +0200
       
       wallet: move get_depending_transactions to AddressSynchronizer
       
       and resolve TODO
       
       Diffstat:
         M electrum/address_synchronizer.py    |       8 ++++++++
         M electrum/wallet.py                  |      11 -----------
       
       2 files changed, 8 insertions(+), 11 deletions(-)
       ---
   DIR diff --git a/electrum/address_synchronizer.py b/electrum/address_synchronizer.py
       t@@ -319,6 +319,14 @@ class AddressSynchronizer(PrintError):
                    self.txi.pop(tx_hash, None)
                    self.txo.pop(tx_hash, None)
        
       +    def get_depending_transactions(self, tx_hash):
       +        """Returns all (grand-)children of tx_hash in this wallet."""
       +        children = set()
       +        for other_hash in self.spent_outpoints[tx_hash].values():
       +            children.add(other_hash)
       +            children |= self.get_depending_transactions(other_hash)
       +        return children
       +
            def receive_tx_callback(self, tx_hash, tx, tx_height):
                self.add_unverified_tx(tx_hash, tx_height)
                self.add_transaction(tx_hash, tx, allow_unrelated=True)
   DIR diff --git a/electrum/wallet.py b/electrum/wallet.py
       t@@ -1068,17 +1068,6 @@ class Abstract_Wallet(AddressSynchronizer):
                index = self.get_address_index(addr)
                return self.keystore.decrypt_message(index, message, password)
        
       -    def get_depending_transactions(self, tx_hash):
       -        """Returns all (grand-)children of tx_hash in this wallet."""
       -        children = set()
       -        # TODO rewrite this to use self.spent_outpoints
       -        for other_hash, tx in self.transactions.items():
       -            for input in (tx.inputs()):
       -                if input["prevout_hash"] == tx_hash:
       -                    children.add(other_hash)
       -                    children |= self.get_depending_transactions(other_hash)
       -        return children
       -
            def txin_value(self, txin):
                txid = txin['prevout_hash']
                prev_n = txin['prevout_n']