aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-08 20:33:14 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-08 20:33:14 +0100
commite0700ad9164867c9209beec09b8001f1741eea15 (patch)
tree1fec321f0d991836b6f2274e14f8b50bb55be9c2 /src/exchangedb
parent21951eacc23611464ada18c99dfb4633b9fcc1b0 (diff)
downloadexchange-e0700ad9164867c9209beec09b8001f1741eea15.tar.xz
optimize /deposit logic to minimize serialization failures (presumably)
Diffstat (limited to 'src/exchangedb')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 33383df59..73a03e751 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -1034,7 +1034,8 @@ prepare_statements (struct PostgresClosure *pg)
") SELECT known_coin_id, $2, $3, $4, $5, $6, "
" $7, $8, $9, $10, $11, $12, $13"
" FROM known_coins"
- " WHERE coin_pub=$1;",
+ " WHERE coin_pub=$1"
+ " ON CONFLICT DO NOTHING;",
13),
/* Fetch an existing deposit request, used to ensure idempotency
during /deposit processing. Used in #postgres_have_deposit(). */