mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
Refactored error handling in add_appointment; minor comments from PR review
This commit is contained in:
@@ -46,8 +46,6 @@ class Watcher:
|
||||
# If the watcher is awake, every new appointment will just be added to the appointment list until
|
||||
# max_appointments is reached.
|
||||
|
||||
signature = None
|
||||
|
||||
if len(self.appointments) < self.max_appointments:
|
||||
# Appointments are identified by the locator: the sha256 of commitment txid (H(tx_id)).
|
||||
# Two different nodes may ask for appointments using the same commitment txid, what will result in a
|
||||
@@ -80,6 +78,7 @@ class Watcher:
|
||||
signature = self.sign_appointment(appointment)
|
||||
else:
|
||||
appointment_added = False
|
||||
signature = None
|
||||
|
||||
logger.info("Maximum appointments reached, appointment rejected.", locator=appointment.locator)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user