Renames dispute_delta to to_self_delay and justice tx to penalty tx

Uses the naming convention followed by LN implementations and BOLTs
This commit is contained in:
Sergi Delgado Segura
2019-12-11 12:45:05 +01:00
parent 6a7cd4d3aa
commit df5dcbdfe9
16 changed files with 203 additions and 194 deletions

View File

@@ -88,17 +88,17 @@ class Cleaner:
confirmations=confirmations,
)
justice_txid = jobs[uuid].justice_txid
penalty_txid = jobs[uuid].penalty_txid
locator = jobs[uuid].locator
jobs.pop(uuid)
if len(tx_job_map[justice_txid]) == 1:
tx_job_map.pop(justice_txid)
if len(tx_job_map[penalty_txid]) == 1:
tx_job_map.pop(penalty_txid)
logger.info("No more jobs for justice transaction.", justice_txid=justice_txid)
logger.info("No more jobs for penalty transaction.", penalty_txid=penalty_txid)
else:
tx_job_map[justice_txid].remove(uuid)
tx_job_map[penalty_txid].remove(uuid)
# Delete appointment from the db (both watchers's and responder's)
db_manager.delete_watcher_appointment(uuid)