+ fs_store.write("", "", OUTBOUND_PAYMENTS_FNAME, &outbound_payments.encode()).unwrap();
+ match pay_invoice(invoice, Retry::Timeout(Duration::from_secs(10)), channel_manager) {
+ Ok(_payment_id) => {
+ let payee_pubkey = invoice.recover_payee_pub_key();
+ let amt_msat = invoice.amount_milli_satoshis().unwrap();
+ println!("EVENT: initiated sending {} msats to {}", amt_msat, payee_pubkey);
+ print!("> ");
+ }
+ Err(e) => {
+ println!("ERROR: failed to send payment: {:?}", e);
+ print!("> ");
+ outbound_payments.payments.get_mut(&payment_hash).unwrap().status = HTLCStatus::Failed;
+ fs_store.write("", "", OUTBOUND_PAYMENTS_FNAME, &outbound_payments.encode()).unwrap();
+ }
+ };