summaryrefslogtreecommitdiff
path: root/src/exchangedb/test_exchangedb.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-08-19 16:01:57 +0200
committerChristian Grothoff <christian@grothoff.org>2018-08-19 16:01:57 +0200
commit0df2028f96f5977739d4659bf253e0c6d9468326 (patch)
tree906222af6c332e219af4a5d112891d7212237de3 /src/exchangedb/test_exchangedb.c
parentddca1f5c68e112928d715e1aee2758c40e14fb51 (diff)
downloadexchange-0df2028f96f5977739d4659bf253e0c6d9468326.tar.gz
exchange-0df2028f96f5977739d4659bf253e0c6d9468326.tar.bz2
exchange-0df2028f96f5977739d4659bf253e0c6d9468326.zip
make transactions smaller to try to reduce rollbacks
Diffstat (limited to 'src/exchangedb/test_exchangedb.c')
-rw-r--r--src/exchangedb/test_exchangedb.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c
index 16467d578..8666f1a5d 100644
--- a/src/exchangedb/test_exchangedb.c
+++ b/src/exchangedb/test_exchangedb.c
@@ -591,6 +591,10 @@ test_melting (struct TALER_EXCHANGEDB_Session *session)
&refresh_session.rc,
&ret_refresh_session));
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
+ plugin->ensure_coin_known (plugin->cls,
+ session,
+ &refresh_session.coin));
+ FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->insert_melt (plugin->cls,
session,
&refresh_session));
@@ -1776,6 +1780,10 @@ run (void *cls)
deadline = GNUNET_TIME_absolute_get ();
(void) GNUNET_TIME_round_abs (&deadline);
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
+ plugin->ensure_coin_known (plugin->cls,
+ session,
+ &deposit.coin));
+ FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->insert_payback_request (plugin->cls,
session,
&reserve_pub,
@@ -1923,6 +1931,10 @@ run (void *cls)
deposit.wire_deadline = deadline;
result = 8;
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
+ plugin->ensure_coin_known (plugin->cls,
+ session,
+ &deposit.coin));
+ FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->insert_deposit (plugin->cls,
session,
&deposit));