File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,13 @@ CREATE TABLE IF NOT EXISTS payment_intents (
3232);
3333
3434-- Index for efficient querying by intent type
35- CREATE INDEX IF NOT EXISTS idx_payment_intents_type
35+ CREATE INDEX IF NOT EXISTS idx_payment_intents_type
3636ON payment_intents(intent_type);
3737
38+ -- Unique constraint for deduplication of payment intents
39+ CREATE UNIQUE INDEX IF NOT EXISTS idx_payment_intents_unique
40+ ON payment_intents(intent_type, intent_payload);
41+
3842-- ─────────────────────────────────────────────
3943-- Payments Table
4044-- ─────────────────────────────────────────────
@@ -187,7 +191,8 @@ CREATE TABLE IF NOT EXISTS payment_htlc_attempt_resolutions (
187191 -- HTLC failure reason code
188192 htlc_fail_reason INTEGER ,
189193
190- -- Failure message from the failing node
194+ -- Failure message from the failing node, this message is binary encoded
195+ -- using the lightning wire protocol, see also lnwire/onion_error.go
191196 failure_msg BLOB,
192197
193198 -- Ensure data integrity: settled attempts must have preimage,
You can’t perform that action at this time.
0 commit comments