diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backenddb/plugin_merchantdb_postgres.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index 0252f418..45f02757 100644 --- a/src/backenddb/plugin_merchantdb_postgres.c +++ b/src/backenddb/plugin_merchantdb_postgres.c @@ -3902,6 +3902,7 @@ RETRY: TALER_PQ_query_param_amount (&d->coin_fee), /* deposit fee */ GNUNET_PQ_query_param_auto_from_type (&d->coin_pub), GNUNET_PQ_query_param_auto_from_type (&d->h_contract_terms), + GNUNET_PQ_query_param_string (instance_id), GNUNET_PQ_query_param_end }; @@ -3920,6 +3921,12 @@ RETRY: qs); return qs; } + if (0 == qs) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "'insert_transfer_to_coin_mapping' failed at %u: deposit unknown\n", + i); + } } /* Update merchant_contract_terms 'wired' status: for all coins that were wired, set the respective order's "wired" status to @@ -8248,8 +8255,12 @@ postgres_connect (void *cls) " FROM merchant_deposits" " JOIN merchant_contract_terms USING (order_serial)" " WHERE coin_pub=$7" - " AND h_contract_terms=$8", - 8), + " AND h_contract_terms=$8" + " AND merchant_serial=" + " (SELECT merchant_serial" + " FROM merchant_instances" + " WHERE merchant_id=$9)", + 9), /* for postgres_insert_transfer_details() */ GNUNET_PQ_make_prepare ("update_wired_by_coin_pub", "WITH os AS" /* select orders affected by the coin */ |