1
0

Allow user to remove onchain backups.

This commit is contained in:
ThomasV
2021-03-22 19:28:24 +01:00
parent ec01380105
commit a5fea043d1
4 changed files with 25 additions and 13 deletions

View File

@@ -456,6 +456,9 @@ class ChannelBackup(AbstractChannel):
current_per_commitment_point=None,
upfront_shutdown_script='')
def can_be_deleted(self):
return self.is_imported or self.is_redeemed()
def get_capacity(self):
return self.lnworker.lnwatcher.get_tx_delta(self.funding_outpoint.txid, self.cb.funding_address)
@@ -550,6 +553,9 @@ class Channel(AbstractChannel):
self.should_request_force_close = False
self.force_close_detected = False # not a state, only for GUI
def can_be_deleted(self):
return self.is_redeemed()
def get_capacity(self):
return self.constraints.capacity