Network::Bitcoin => bitcoin_bech32::constants::Network::Bitcoin,
Network::Testnet => bitcoin_bech32::constants::Network::Testnet,
Network::Regtest => bitcoin_bech32::constants::Network::Regtest,
- Network::Signet => panic!("Signet unsupported"),
+ Network::Signet => bitcoin_bech32::constants::Network::Signet,
},
)
.expect("Lightning funding tx should always be to a SegWit output")
}
}
}
- Event::PaymentSent { payment_preimage, payment_hash, .. } => {
+ Event::PaymentSent { payment_preimage, payment_hash, fee_paid_msat, .. } => {
let mut payments = outbound_payments.lock().unwrap();
for (hash, payment) in payments.iter_mut() {
if *hash == *payment_hash {
payment.preimage = Some(*payment_preimage);
payment.status = HTLCStatus::Succeeded;
println!(
- "\nEVENT: successfully sent payment of {} millisatoshis from \
+ "\nEVENT: successfully sent payment of {} millisatoshis{} from \
payment hash {:?} with preimage {:?}",
payment.amt_msat,
+ if let Some(fee) = fee_paid_msat {
+ format!(" (fee {} msat)", fee)
+ } else {
+ "".to_string()
+ },
hex_utils::hex_str(&payment_hash.0),
hex_utils::hex_str(&payment_preimage.0)
);
peer_manager.clone(),
channel_manager.clone(),
keys_manager.clone(),
- network_graph.clone(),
- scorer.clone(),
inbound_payments,
outbound_payments,
ldk_data_dir.clone(),
- logger.clone(),
network,
)
.await;