+ /// Indicates an outbound payment we made succeeded (ie it made it all the way to its target
+ /// and we got back the payment preimage for it).
+ /// Note that duplicative PaymentSent Events may be generated - it is your responsibility to
+ /// deduplicate them by payment_preimage (which MUST be unique)!
+ PaymentSent {
+ /// The preimage to the hash given to ChannelManager::send_payment.
+ /// Note that this serves as a payment receipt, if you wish to have such a thing, you must
+ /// store it somehow!
+ payment_preimage: PaymentPreimage,
+ },
+ /// Indicates an outbound payment we made failed. Probably some intermediary node dropped
+ /// something. You may wish to retry with a different route.
+ /// Note that duplicative PaymentFailed Events may be generated - it is your responsibility to
+ /// deduplicate them by payment_hash (which MUST be unique)!
+ PaymentFailed {
+ /// The hash which was given to ChannelManager::send_payment.
+ payment_hash: PaymentHash,
+ /// Indicates the payment was rejected for some reason by the recipient. This implies that
+ /// the payment has failed, not just the route in question. If this is not set, you may
+ /// retry the payment via a different route.
+ rejected_by_dest: bool,
+#[cfg(test)]
+ error_code: Option<u16>,
+ },