handle idempotency on purse deletion

This commit is contained in:
Christian Grothoff 2022-12-28 12:41:49 +01:00
parent 7212cd12bc
commit 1e7e0058e8
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -54,7 +54,13 @@ INSERT INTO purse_deletion
,purse_sig) ,purse_sig)
VALUES VALUES
(in_purse_pub (in_purse_pub
,in_purse_sig); ,in_purse_sig)
ON CONFLICT DO NOTHING;
IF NOT FOUND
THEN
RETURN;
END IF;
-- store purse decision -- store purse decision
INSERT INTO purse_decision INSERT INTO purse_decision