diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-05-12 13:31:15 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-05-12 13:31:15 +0200 |
commit | 35b4a51e14dc08e1aa6a00d8edca5eda75c3e3de (patch) | |
tree | dc5a725d4fbe95765c2d61761714cbfd2a395d55 /src/exchangedb | |
parent | 93eb88a8c9cb520808bb39c9f4bc527c9f01fc57 (diff) | |
download | exchange-35b4a51e14dc08e1aa6a00d8edca5eda75c3e3de.tar.gz exchange-35b4a51e14dc08e1aa6a00d8edca5eda75c3e3de.tar.bz2 exchange-35b4a51e14dc08e1aa6a00d8edca5eda75c3e3de.zip |
combine auto-commited transactions in refresh/reveal into one big transaction
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index 1839b13be..4175678a5 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -1263,7 +1263,8 @@ prepare_statements (struct PostgresClosure *pg) ") SELECT $1, $2, $3, " " denominations_serial, $5, $6, $7, $8" " FROM denominations" - " WHERE denom_pub_hash=$4;", + " WHERE denom_pub_hash=$4" + " ON CONFLICT DO NOTHING;", 8), /* Obtain information about the coins created in a refresh operation, used in #postgres_get_refresh_reveal() */ @@ -1293,7 +1294,8 @@ prepare_statements (struct PostgresClosure *pg) "(melt_serial_id" ",transfer_pub" ",transfer_privs" - ") VALUES ($1, $2, $3);", + ") VALUES ($1, $2, $3)" + " ON CONFLICT DO NOTHING;", 3), /* Used in #postgres_insert_refund() to store refund information */ GNUNET_PQ_make_prepare ( |