paymentsdb: make verifyAttempt more robust
We now return an error when blinded and non blinded attempts are combined. This was theoretically possible to register a legacy attempt in combination with a blinded payment. This would have been prevented by other checks in the code because legacy payments are not split into shards.
This commit is contained in:
1 parent
cbfc0e0dc2
commit
c08f918ffc
3 files changed
+273
No files matched your search
@@ -78,6 +78,12 @@ var (
|
||||
ErrBlindedPaymentTotalAmountMismatch = errors.New("blinded path " +
|
||||
"total amount mismatch")
|
||||
|
||||
// ErrMixedBlindedAndNonBlindedPayments is returned if we try to
|
||||
// register a non-blinded attempt to a payment which uses a blinded
|
||||
// paths or vice versa.
|
||||
ErrMixedBlindedAndNonBlindedPayments = errors.New("mixed blinded and " +
|
||||
"non-blinded payments")
|
||||
|
||||
// ErrMPPPaymentAddrMismatch is returned if we try to register an MPP
|
||||
// shard where the payment address doesn't match existing shards.
|
||||
ErrMPPPaymentAddrMismatch = errors.New("payment address mismatch")
|
||||
|
||||
Reference in new issue
Block a user