db_postgres: use tx for all queries in StoreClientDeliveryReceipts

This commit is contained in:
Simon Ser 2021-10-13 19:15:50 +02:00
parent 79dbb20f98
commit d334bb18a2

View File

@ -417,7 +417,7 @@ func (db *PostgresDB) StoreClientDeliveryReceipts(networkID int64, client string
return err return err
} }
stmt, err := db.db.Prepare(` stmt, err := tx.Prepare(`
INSERT INTO "DeliveryReceipt" (network, target, client, internal_msgid) INSERT INTO "DeliveryReceipt" (network, target, client, internal_msgid)
VALUES ($1, $2, $3, $4) VALUES ($1, $2, $3, $4)
RETURNING id`) RETURNING id`)