mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-02 18:25:21 +00:00
lightning: fix tests
This commit is contained in:
parent
f680708b87
commit
1b11fc2f79
1 changed files with 4 additions and 0 deletions
|
@ -373,6 +373,8 @@ class HTLCStateMachine(PrintError):
|
|||
# TODO batch sweeps
|
||||
# TODO sweep HTLC outputs
|
||||
def process_new_offchain_ctx(self, ctx, ours: bool):
|
||||
if not self.lnwatcher:
|
||||
return
|
||||
outpoint = self.funding_outpoint.to_str()
|
||||
if ours:
|
||||
ctn = self.local_state.ctn + 1
|
||||
|
@ -386,6 +388,8 @@ class HTLCStateMachine(PrintError):
|
|||
self.lnwatcher.add_sweep_tx(outpoint, ctx.txid(), encumbered_sweeptx)
|
||||
|
||||
def process_new_revocation_secret(self, per_commitment_secret: bytes):
|
||||
if not self.lnwatcher:
|
||||
return
|
||||
outpoint = self.funding_outpoint.to_str()
|
||||
ctx = self.remote_commitment_to_be_revoked
|
||||
encumbered_sweeptx = maybe_create_sweeptx_for_their_ctx_to_local(self, ctx, per_commitment_secret, self.sweep_address)
|
||||
|
|
Loading…
Add table
Reference in a new issue