Skip to content

Commit 3a426c3

Browse files
committed
Allow inserting the same share multiple times
This may happen in the Gnosis implementation in case a user reuses an identity.
1 parent e389bbd commit 3a426c3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

rolling-shutter/keyper/database/keyper.sqlc.gen.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rolling-shutter/keyper/database/sql/queries/keyper.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ SELECT EXISTS (
1616

1717
-- name: InsertDecryptionKeyShare :exec
1818
INSERT INTO decryption_key_share (eon, epoch_id, keyper_index, decryption_key_share)
19-
VALUES ($1, $2, $3, $4);
19+
VALUES ($1, $2, $3, $4)
20+
ON CONFLICT DO NOTHING;
2021

2122
-- name: SelectDecryptionKeyShares :many
2223
SELECT * FROM decryption_key_share

0 commit comments

Comments
 (0)