diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-01-06 13:12:25 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-01-06 13:12:25 +0100 |
commit | e58b96e20375d3343c51c9081e42512bd3f1ded2 (patch) | |
tree | 5f19dd6e7f41c334a1ab061974c5158dcbbff241 /src/exchangedb | |
parent | 4d00c34829c429e8942a4192b64c7ffb83b47bf0 (diff) | |
parent | cc07a7542408731278859d8b5e1f995c39884ad9 (diff) | |
download | exchange-e58b96e20375d3343c51c9081e42512bd3f1ded2.tar.xz |
Merge branch 'master' of git+ssh://git.taler.net/exchange
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/pg_batch2_reserves_in_insert.c | 17 | ||||
-rw-r--r-- | src/exchangedb/test_exchangedb_by_j.c | 2 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/exchangedb/pg_batch2_reserves_in_insert.c b/src/exchangedb/pg_batch2_reserves_in_insert.c index 510fde85d..a55c518c3 100644 --- a/src/exchangedb/pg_batch2_reserves_in_insert.c +++ b/src/exchangedb/pg_batch2_reserves_in_insert.c @@ -100,6 +100,7 @@ insert1(struct PostgresClosure *pg, GNUNET_PQ_result_spec_end }; + TALER_payto_hash (reserves[0].sender_account_details, &h_payto); @@ -107,6 +108,7 @@ insert1(struct PostgresClosure *pg, "batch1_reserve_create", params, rs); + if (qs2 < 0) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, @@ -705,7 +707,7 @@ TEH_PG_batch2_reserves_in_insert (void *cls, if (qs1<0) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Failed to update reserves 8 (%d)\n", + "Failed to create reserve batch_8 (%d)\n", qs1); return qs1; } @@ -749,7 +751,7 @@ TEH_PG_batch2_reserves_in_insert (void *cls, if (qs4<0) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Failed to update reserves4 (%d)\n", + "Failed to create reserve batch_4 (%d)\n", qs4); return qs4; } @@ -779,7 +781,7 @@ TEH_PG_batch2_reserves_in_insert (void *cls, if (qs5<0) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Failed to update reserves 2 (%d)\n", + "Failed to create reserve batch_2 (%d)\n", qs5); return qs5; } @@ -804,13 +806,16 @@ TEH_PG_batch2_reserves_in_insert (void *cls, &conflicts[i], &reserve_uuid[i], &results[i]); - if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs2) + if (qs2<0) { - GNUNET_break (0); - return GNUNET_DB_STATUS_HARD_ERROR; + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Failed to create reserve batch_1 (%d)\n)" + ,qs2); + return qs2; } need_update |= conflicts[i]; t_duplicate |= transaction_duplicate[i]; + // fprintf(stdout, "reserve uuid : %ld c :%d t:%d\n", reserve_uuid[i], conflicts[i], transaction_duplicate[i]); i += 1; break; case 0: diff --git a/src/exchangedb/test_exchangedb_by_j.c b/src/exchangedb/test_exchangedb_by_j.c index 0e42fbe78..9769d964b 100644 --- a/src/exchangedb/test_exchangedb_by_j.c +++ b/src/exchangedb/test_exchangedb_by_j.c @@ -107,7 +107,7 @@ run (void *cls) const char *sndr = "payto://x-taler-bank/localhost:8080/1"; struct TALER_Amount value; unsigned int batch_size = batches[i]; - unsigned int iterations = 200;//1024*10; + unsigned int iterations = 16;//1024*10; struct TALER_ReservePublicKeyP reserve_pubs[iterations]; struct GNUNET_TIME_Absolute now; struct GNUNET_TIME_Timestamp ts; |