summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-05-24 12:00:20 +0200
committerChristian Grothoff <christian@grothoff.org>2022-05-24 12:00:20 +0200
commitd77354b11ad73834aa75d4e61874b7bb901c1aa3 (patch)
tree792bce7a06ae41eb268641a2c9edc2d2eba89930 /src/exchange
parent8e71a7e4de8c07767e8e11e745d9a7fc3bacc94f (diff)
downloadexchange-d77354b11ad73834aa75d4e61874b7bb901c1aa3.tar.gz
exchange-d77354b11ad73834aa75d4e61874b7bb901c1aa3.tar.bz2
exchange-d77354b11ad73834aa75d4e61874b7bb901c1aa3.zip
use precise time for shards
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-wirewatch.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c
index a14356273..7a17239d9 100644
--- a/src/exchange/taler-exchange-wirewatch.c
+++ b/src/exchange/taler-exchange-wirewatch.c
@@ -417,7 +417,7 @@ schedule_transfers (struct WireAccount *wa)
wa = wa_head;
GNUNET_assert (NULL != wa);
}
- if (shard_done)
+ if (wa->shard_open)
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Will retry my shard (%llu,%llu] of %s in %s\n",
(unsigned long long) wa->shard_start,
@@ -527,14 +527,14 @@ check_shard_done (struct WireAccount *wa)
break;
case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
/* normal case */
- wa->shard_delay = GNUNET_TIME_absolute_get_duration (wa->shard_start_time);
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Completed shard %s (%llu,%llu] after %s\n",
wa->job_name,
(unsigned long long) wa->shard_start,
(unsigned long long) wa->shard_end,
- GNUNET_STRINGS_relative_time_to_string (wa->shard_delay,
- GNUNET_YES));
+ GNUNET_STRINGS_relative_time_to_string (
+ GNUNET_TIME_absolute_get_duration (wa->shard_start_time),
+ GNUNET_YES));
break;
}
return true;
@@ -583,6 +583,7 @@ do_commit (struct WireAccount *wa)
}
if (shard_done)
{
+ wa->shard_delay = GNUNET_TIME_absolute_get_duration (wa->shard_start_time);
wa->shard_open = false;
account_completed (wa);
}
@@ -829,6 +830,9 @@ lock_shard (void *cls)
wa);
return;
}
+ if (wa->shard_open)
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Shard not completed in time, will try to re-acquire\n");
/* How long we lock a shard depends on the number of
workers expected, and how long we usually took to
process a shard. */