From 545182e0a550b9dc7ff77476d3f4b39bcad5b24e Mon Sep 17 00:00:00 2001 From: Janus Date: Tue, 11 Dec 2018 20:27:36 +0100 Subject: [PATCH] lnsweep: make maybe_create_sweeptx_for_their_ctx_to_local consistent --- electrum/lnsweep.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/electrum/lnsweep.py b/electrum/lnsweep.py index cc9aeb658..cf52a15b4 100644 --- a/electrum/lnsweep.py +++ b/electrum/lnsweep.py @@ -36,7 +36,7 @@ def maybe_create_sweeptx_for_their_ctx_to_remote(ctx: Transaction, sweep_address def maybe_create_sweeptx_for_their_ctx_to_local(ctx: Transaction, revocation_privkey: bytes, to_self_delay: int, delayed_pubkey: bytes, - sweep_address: str) -> Optional[EncumberedTransaction]: + sweep_address: str) -> Optional[Transaction]: revocation_pubkey = ecc.ECPrivkey(revocation_privkey).get_public_key_bytes(compressed=True) witness_script = bh2u(make_commitment_output_to_local_witness_script( revocation_pubkey, to_self_delay, delayed_pubkey)) @@ -49,8 +49,7 @@ def maybe_create_sweeptx_for_their_ctx_to_local(ctx: Transaction, revocation_pri witness_script=witness_script, privkey=revocation_privkey, is_revocation=True) - if sweep_tx is None: return None - return EncumberedTransaction('their_ctx_to_local', sweep_tx, csv_delay=0, cltv_expiry=0) + return sweep_tx def create_sweeptxs_for_their_just_revoked_ctx(chan: 'Channel', ctx: Transaction, per_commitment_secret: bytes,