electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 545182e0a550b9dc7ff77476d3f4b39bcad5b24e
parent 3aa36c15025f27dc6e47f5027be991cf2ff3e020
Author: Janus <ysangkok@gmail.com>
Date:   Tue, 11 Dec 2018 20:27:36 +0100

lnsweep: make maybe_create_sweeptx_for_their_ctx_to_local consistent

Diffstat:
Melectrum/lnsweep.py | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 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,