aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-07-21 19:38:22 +0200
committerChristian Grothoff <christian@grothoff.org>2017-07-21 19:38:22 +0200
commit2b567692626f6bd741f6f4199874ce7292004cf8 (patch)
tree2a868122775ecf2fd279bb2d39c4d4db3ee8f86b
parent3e111f42636a634d9144b5ae66dcd6d342d0c4d2 (diff)
improve diagnostics
-rw-r--r--src/exchange/taler-exchange-httpd_deposit.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_deposit.c b/src/exchange/taler-exchange-httpd_deposit.c
index 0234946d3..8d824b7fd 100644
--- a/src/exchange/taler-exchange-httpd_deposit.c
+++ b/src/exchange/taler-exchange-httpd_deposit.c
@@ -309,10 +309,24 @@ check_timestamp_current (struct GNUNET_TIME_Absolute ts)
tolerance = GNUNET_TIME_UNIT_MONTHS;
r = GNUNET_TIME_absolute_get_duration (ts);
if (r.rel_value_us > tolerance.rel_value_us)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Deposit timestamp too old: %llu vs %llu > %llu\n",
+ (unsigned long long) ts.abs_value_us,
+ (unsigned long long) GNUNET_TIME_absolute_get().abs_value_us,
+ (unsigned long long) tolerance.rel_value_us);
return GNUNET_SYSERR;
+ }
r = GNUNET_TIME_absolute_get_remaining (ts);
if (r.rel_value_us > tolerance.rel_value_us)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Deposit timestamp too new: %llu vs %llu < - %llu\n",
+ (unsigned long long) ts.abs_value_us,
+ (unsigned long long) GNUNET_TIME_absolute_get().abs_value_us,
+ (unsigned long long) tolerance.rel_value_us);
return GNUNET_SYSERR;
+ }
return GNUNET_OK;
}