aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-11-17 14:47:47 +0100
committerChristian Grothoff <christian@grothoff.org>2016-11-17 14:47:47 +0100
commit5e2b3e1cfaf06f46faf092003528dcb8c9ebe618 (patch)
tree83855547ade44bb6e3bff66bf06b17f2d432a2ff
parente3ec645b0da594ccc3bf915b94f7ad77ca1e2a81 (diff)
handle case rowid = 0
-rw-r--r--src/auditor/taler-auditor.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index 4cc1aed7d..541ed21aa 100644
--- a/src/auditor/taler-auditor.c
+++ b/src/auditor/taler-auditor.c
@@ -112,9 +112,8 @@ handle_reserve_in (void *cls,
matches wire transfers from the bank. Not sure if this should be
done within the core auditor logic though... */
- GNUNET_assert (rowid == reserve_in_serial_id + 1); /* should be monotonically increasing */
- reserve_in_serial_id = GNUNET_MAX (rowid,
- reserve_in_serial_id);
+ GNUNET_assert (rowid == reserve_in_serial_id); /* should be monotonically increasing */
+ reserve_in_serial_id = rowid + 1;
GNUNET_CRYPTO_hash (reserve_pub,
sizeof (*reserve_pub),
&key);
@@ -174,9 +173,8 @@ handle_reserve_out (void *cls,
struct ReserveSummary *rs;
/* TODO: check signatures, in particluar the reserve_sig! */
- GNUNET_assert (rowid == reserve_out_serial_id + 1); /* should be monotonically increasing */
- reserve_in_serial_id = GNUNET_MAX (rowid,
- reserve_out_serial_id);
+ GNUNET_assert (rowid == reserve_out_serial_id); /* should be monotonically increasing */
+ reserve_in_serial_id = rowid + 1;
GNUNET_CRYPTO_hash (reserve_pub,
sizeof (*reserve_pub),
&key);