mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 09:21:39 +00:00
lnsweep: make maybe_create_sweeptx_for_their_ctx_to_local consistent
This commit is contained in:
parent
3aa36c1502
commit
545182e0a5
1 changed files with 2 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue