URI: 
       tsweep: use scripthash rpc - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit fefcd7bbcd80171d6d36ea4a19fc87797a7d8fdd
   DIR parent 5127dabb0df823529161a392490ec0357ad8affb
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Fri,  6 Oct 2017 09:56:54 +0200
       
       sweep: use scripthash rpc
       
       Diffstat:
         M lib/wallet.py                       |       6 ++----
       
       1 file changed, 2 insertions(+), 4 deletions(-)
       ---
   DIR diff --git a/lib/wallet.py b/lib/wallet.py
       t@@ -878,14 +878,12 @@ class Abstract_Wallet(PrintError):
                    txin_type, privkey, compressed = bitcoin.deserialize_privkey(sec)
                    pubkey = bitcoin.public_key_from_private_key(privkey, compressed)
                    address = bitcoin.pubkey_to_address(txin_type, pubkey)
       -            u = network.synchronous_get(('blockchain.address.listunspent', [address]))
       -            pay_script = bitcoin.address_to_script(address)
       +            sh = bitcoin.address_to_scripthash(address)
       +            u = network.synchronous_get(('blockchain.scripthash.listunspent', [sh]))
                    for item in u:
                        if len(inputs) >= imax:
                            break
                        item['type'] = txin_type
       -                item['scriptPubKey'] = pay_script
       -                item['redeemPubkey'] = pubkey
                        item['address'] = address
                        item['prevout_hash'] = item['tx_hash']
                        item['prevout_n'] = item['tx_pos']