From d334bb18a2b6440fc8c221609fbae7db4e70d355 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 13 Oct 2021 19:15:50 +0200 Subject: [PATCH] db_postgres: use tx for all queries in StoreClientDeliveryReceipts --- db_postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_postgres.go b/db_postgres.go index fbfa19b..4898586 100644 --- a/db_postgres.go +++ b/db_postgres.go @@ -417,7 +417,7 @@ func (db *PostgresDB) StoreClientDeliveryReceipts(networkID int64, client string return err } - stmt, err := db.db.Prepare(` + stmt, err := tx.Prepare(` INSERT INTO "DeliveryReceipt" (network, target, client, internal_msgid) VALUES ($1, $2, $3, $4) RETURNING id`)