use bitcoin::hashes::sha256::Hash as Sha256;
use bitcoin::secp256k1::{self, Secp256k1, SecretKey};
use bitcoin::hashes::sha256::Hash as Sha256;
use bitcoin::secp256k1::{self, Secp256k1, SecretKey};
use crate::ln::{PaymentHash, PaymentPreimage, PaymentSecret};
use crate::ln::channelmanager::{HTLCSource, IDEMPOTENCY_TIMEOUT_TICKS, PaymentId};
use crate::ln::msgs::DecodeError;
use crate::ln::{PaymentHash, PaymentPreimage, PaymentSecret};
use crate::ln::channelmanager::{HTLCSource, IDEMPOTENCY_TIMEOUT_TICKS, PaymentId};
use crate::ln::msgs::DecodeError;
match self {
PendingOutboundPayment::Legacy { .. } => None,
PendingOutboundPayment::Retryable { payment_hash, .. } => Some(*payment_hash),
match self {
PendingOutboundPayment::Legacy { .. } => None,
PendingOutboundPayment::Retryable { payment_hash, .. } => Some(*payment_hash),
let mut session_privs = HashSet::new();
core::mem::swap(&mut session_privs, match self {
PendingOutboundPayment::Legacy { session_privs } |
let mut session_privs = HashSet::new();
core::mem::swap(&mut session_privs, match self {
PendingOutboundPayment::Legacy { session_privs } |
*self = PendingOutboundPayment::Fulfilled { session_privs, payment_hash, timer_ticks_without_htlcs: 0 };
}
*self = PendingOutboundPayment::Fulfilled { session_privs, payment_hash, timer_ticks_without_htlcs: 0 };
}
let mut session_privs = HashSet::new();
let our_payment_hash;
core::mem::swap(&mut session_privs, match self {
let mut session_privs = HashSet::new();
let our_payment_hash;
core::mem::swap(&mut session_privs, match self {
let remove_res = match self {
PendingOutboundPayment::Legacy { session_privs } |
PendingOutboundPayment::Retryable { session_privs, .. } |
let remove_res = match self {
PendingOutboundPayment::Legacy { session_privs } |
PendingOutboundPayment::Retryable { session_privs, .. } |
&self, route: &Route, payment_hash: PaymentHash, payment_secret: &Option<PaymentSecret>,
payment_id: PaymentId, keys_manager: &K, best_block_height: u32, send_payment_along_path: F
) -> Result<(), PaymentSendFailure>
&self, route: &Route, payment_hash: PaymentHash, payment_secret: &Option<PaymentSecret>,
payment_id: PaymentId, keys_manager: &K, best_block_height: u32, send_payment_along_path: F
) -> Result<(), PaymentSendFailure>
&self, route: &Route, payment_id: PaymentId, keys_manager: &K, best_block_height: u32,
send_payment_along_path: F
) -> Result<(), PaymentSendFailure>
&self, route: &Route, payment_id: PaymentId, keys_manager: &K, best_block_height: u32,
send_payment_along_path: F
) -> Result<(), PaymentSendFailure>