]> git.bitcoin.ninja Git - rust-lightning/commit
Add a separate PaymentSendFailure for idempotency violation 2022-10-idempotency-err
authorMatt Corallo <git@bluematt.me>
Wed, 2 Nov 2022 23:25:34 +0000 (23:25 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 9 Nov 2022 18:44:27 +0000 (18:44 +0000)
commitfcf73f0f45d05e0bb2e6118c6d05291adcb5bc0b
treed7e4e7d14e794dd6e55d7206b1c679aa29c93adc
parentc90aac26ad3edf6a3878f63b50c5e9ee425c8f56
Add a separate PaymentSendFailure for idempotency violation

When a user attempts to send a payment but it fails due to
idempotency key violation, they need to know that this was the
reason as they need to handle the error programmatically
differently from other errors.

Here we simply add a new `PaymentSendFailure` enum variant for
`DuplicatePayment` to allow for that.
fuzz/src/chanmon_consistency.rs
lightning-invoice/src/payment.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/payment_tests.rs