Handle interception probing payments

probing payments uses a probing payment hash which is:
sha256("probing-01:" || payment_hash).

When the interceptor detects such a hash for a payment which is supposed
to trigger a channel creation , it checks if the destination is online,
and if online, fails with INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS error in
order to let the payer knows that the payment would be successful.
This commit is contained in:
Yaacov Akiba Slama
2020-11-08 17:46:26 +02:00
parent faff8f60a9
commit f407ec9e9c
5 changed files with 53 additions and 20 deletions

View File

@@ -0,0 +1 @@
DROP INDEX probe_payment_hash;

View File

@@ -0,0 +1 @@
CREATE INDEX probe_payment_hash ON public.payments (sha256('probing-01:' || payment_hash));