diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-05-11 12:50:58 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-05-11 12:50:58 +0200 |
commit | 5ab6a385f191a85eef24076ecc6a307665598f19 (patch) | |
tree | a906bb3adecd95a27c6057aa927d6b8e89ec70d0 /src/backenddb/plugin_merchantdb_postgres.c | |
parent | 0bcf8ea877423dd9401f74d9fdb4df790267548f (diff) | |
download | merchant-5ab6a385f191a85eef24076ecc6a307665598f19.tar.gz merchant-5ab6a385f191a85eef24076ecc6a307665598f19.tar.bz2 merchant-5ab6a385f191a85eef24076ecc6a307665598f19.zip |
add instance to query to ensure no cross-instance conflicts; still, this does not explain the GNUNET_break()/assert failure in #6854
Diffstat (limited to 'src/backenddb/plugin_merchantdb_postgres.c')
-rw-r--r-- | src/backenddb/plugin_merchantdb_postgres.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index b5a75222..dc8c8456 100644 --- a/src/backenddb/plugin_merchantdb_postgres.c +++ b/src/backenddb/plugin_merchantdb_postgres.c @@ -3839,6 +3839,7 @@ postgres_lookup_deposits_by_contract_and_coin ( static enum GNUNET_DB_QueryStatus postgres_lookup_transfer ( void *cls, + const char *instance_id, const char *exchange_url, const struct TALER_WireTransferIdentifierRawP *wtid, struct TALER_Amount *total_amount, @@ -3850,6 +3851,7 @@ postgres_lookup_transfer ( struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_string (exchange_url), GNUNET_PQ_query_param_auto_from_type (wtid), + GNUNET_PQ_query_param_string (instance_id), GNUNET_PQ_query_param_end }; uint8_t verified8; @@ -7816,9 +7818,11 @@ postgres_connect (void *cls) " FROM merchant_transfers" " JOIN merchant_transfer_signatures USING (credit_serial)" " JOIN merchant_accounts USING (account_serial)" + " JOIN merchant_instances USING (merchant_serial)" " WHERE wtid=$2" - " AND exchange_url=$1", - 2), + " AND exchange_url=$1" + " AND merchant_id=$3;", + 3), /* for postgres_set_transfer_status_to_verified() */ GNUNET_PQ_make_prepare ("set_transfer_status_to_verified", "UPDATE merchant_transfers SET" |