sqldb: add AMP invoices SQL schema
Schema for AMP invocies. AMP invoices can be paid multiple times and each payment to an AMP invoice is identified by a `set_id`. The A in AMP stands for `Atomic`. All the htlcs belonging to the same AMP payment (share the same set_id) will be resolved at the same time with the same result: settled/canceled. AMP invoices do not have an "invoice preimage". Instead, each htcl has its own hash/preimage. When a new htlc is added the hash for that htlc is attached to it. When all the htlcs of a set_id have been received we are able to compute the preimage for each one of them.
This commit is contained in:
2 files changed
+62
No files matched your search
@@ -0,0 +1,8 @@
|
||||
DROP INDEX IF EXISTS amp_htlcs_htlc_id_idx;
|
||||
DROP INDEX IF EXISTS amp_htlcs_invoice_id_idx;
|
||||
DROP INDEX IF EXISTS amp_htlcs_set_id_idx;
|
||||
DROP TABLE IF EXISTS amp_invoice_htlcs;
|
||||
|
||||
DROP INDEX IF EXISTS amp_invoice_payments_invoice_id_idx;
|
||||
DROP TABLE IF EXISTS amp_invoice_payments;
|
||||
|
||||
Reference in new issue
Block a user