URI: 
       tformatting - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 5776b322f7102f07bf6c3800873c9df44912382a
   DIR parent b0f39718bb2fe6c4e88594f780505ecc00833241
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Mon, 31 Dec 2018 11:15:26 +0100
       
       formatting
       
       Diffstat:
         M electrum/lnsweep.py                 |      13 +++++++------
       
       1 file changed, 7 insertions(+), 6 deletions(-)
       ---
   DIR diff --git a/electrum/lnsweep.py b/electrum/lnsweep.py
       t@@ -451,15 +451,16 @@ def create_sweeptx_ctx_to_local(sweep_address: str, ctx: Transaction, output_idx
                assert isinstance(to_self_delay, int)
                sweep_inputs[0]['sequence'] = to_self_delay
            tx_size_bytes = 121  # approx size of to_local -> p2wpkh
       -    if fee_per_kb is None: fee_per_kb = FEERATE_FALLBACK_STATIC_FEE
       +    if fee_per_kb is None:
       +        fee_per_kb = FEERATE_FALLBACK_STATIC_FEE
            fee = SimpleConfig.estimate_fee_for_feerate(fee_per_kb, tx_size_bytes)
            outvalue = val - fee
       -    if outvalue <= dust_threshold(): return None
       +    if outvalue <= dust_threshold():
       +        return None
            sweep_outputs = [TxOutput(TYPE_ADDRESS, sweep_address, outvalue)]
       -    if is_revocation:
       -        sweep_tx = Transaction.from_io(sweep_inputs, sweep_outputs, version=2, name='their_ctx_to_local')
       -    else:
       -        sweep_tx = Transaction.from_io(sweep_inputs, sweep_outputs, version=2, name='our_ctx_to_local', csv_delay=to_self_delay)
       +    name = 'their_ctx_to_local' if is_revocation else 'our_ctx_to_local'
       +    csv_delay = 0 if is_revocation else to_self_delay
       +    sweep_tx = Transaction.from_io(sweep_inputs, sweep_outputs, version=2, name=name, csv_delay=csv_delay)
            sig = sweep_tx.sign_txin(0, privkey)
            witness = construct_witness([sig, int(is_revocation), witness_script])
            sweep_tx.inputs()[0]['witness'] = witness