Merge branch 'master' of git+ssh://git.taler.net/exchange

This commit is contained in:
Christian Grothoff 2023-01-06 13:12:25 +01:00
commit e58b96e203
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 12 additions and 7 deletions

View File

@ -100,6 +100,7 @@ insert1(struct PostgresClosure *pg,
GNUNET_PQ_result_spec_end GNUNET_PQ_result_spec_end
}; };
TALER_payto_hash (reserves[0].sender_account_details, TALER_payto_hash (reserves[0].sender_account_details,
&h_payto); &h_payto);
@ -107,6 +108,7 @@ insert1(struct PostgresClosure *pg,
"batch1_reserve_create", "batch1_reserve_create",
params, params,
rs); rs);
if (qs2 < 0) if (qs2 < 0)
{ {
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@ -705,7 +707,7 @@ TEH_PG_batch2_reserves_in_insert (void *cls,
if (qs1<0) if (qs1<0)
{ {
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Failed to update reserves 8 (%d)\n", "Failed to create reserve batch_8 (%d)\n",
qs1); qs1);
return qs1; return qs1;
} }
@ -749,7 +751,7 @@ TEH_PG_batch2_reserves_in_insert (void *cls,
if (qs4<0) if (qs4<0)
{ {
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Failed to update reserves4 (%d)\n", "Failed to create reserve batch_4 (%d)\n",
qs4); qs4);
return qs4; return qs4;
} }
@ -779,7 +781,7 @@ TEH_PG_batch2_reserves_in_insert (void *cls,
if (qs5<0) if (qs5<0)
{ {
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Failed to update reserves 2 (%d)\n", "Failed to create reserve batch_2 (%d)\n",
qs5); qs5);
return qs5; return qs5;
} }
@ -804,13 +806,16 @@ TEH_PG_batch2_reserves_in_insert (void *cls,
&conflicts[i], &conflicts[i],
&reserve_uuid[i], &reserve_uuid[i],
&results[i]); &results[i]);
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs2) if (qs2<0)
{ {
GNUNET_break (0); GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
return GNUNET_DB_STATUS_HARD_ERROR; "Failed to create reserve batch_1 (%d)\n)"
,qs2);
return qs2;
} }
need_update |= conflicts[i]; need_update |= conflicts[i];
t_duplicate |= transaction_duplicate[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; i += 1;
break; break;
case 0: case 0:

View File

@ -107,7 +107,7 @@ run (void *cls)
const char *sndr = "payto://x-taler-bank/localhost:8080/1"; const char *sndr = "payto://x-taler-bank/localhost:8080/1";
struct TALER_Amount value; struct TALER_Amount value;
unsigned int batch_size = batches[i]; 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 TALER_ReservePublicKeyP reserve_pubs[iterations];
struct GNUNET_TIME_Absolute now; struct GNUNET_TIME_Absolute now;
struct GNUNET_TIME_Timestamp ts; struct GNUNET_TIME_Timestamp ts;