Improve return messages from 83df910d5954bf1943e504b84e3aa5e0eb8b21d7

This commit is contained in:
Sergi Delgado Segura
2020-02-14 13:31:23 +01:00
parent 4c9ddd0827
commit 99a9b2f33e

View File

@@ -221,7 +221,7 @@ class Inspector:
elif end_time > block_height + BLOCKS_IN_A_MONTH: # 4320 = roughly a month in blocks elif end_time > block_height + BLOCKS_IN_A_MONTH: # 4320 = roughly a month in blocks
rcode = errors.APPOINTMENT_FIELD_TOO_BIG rcode = errors.APPOINTMENT_FIELD_TOO_BIG
message = "end_time should be within the next month (>= current_height + 4320)" message = "end_time should be within the next month (<= current_height + 4320)"
elif start_time >= end_time: elif start_time >= end_time:
rcode = errors.APPOINTMENT_FIELD_TOO_SMALL rcode = errors.APPOINTMENT_FIELD_TOO_SMALL
@@ -277,8 +277,8 @@ class Inspector:
elif to_self_delay > start_end_diff: elif to_self_delay > start_end_diff:
rcode = errors.APPOINTMENT_FIELD_TOO_BIG rcode = errors.APPOINTMENT_FIELD_TOO_BIG
message = "to_self_delay can't be bigger than the appointment time {} ({})".format( message = "to_self_delay can't be bigger than the appointment time ({} > {})".format(
start_end_diff, to_self_delay to_self_delay, start_end_diff
) )
elif to_self_delay < self.config.get("MIN_TO_SELF_DELAY"): elif to_self_delay < self.config.get("MIN_TO_SELF_DELAY"):