- for (payment_hash, payment_info) in payments.deref() {
- let direction_str = match payment_info.1 {
- HTLCDirection::Inbound => "inbound",
- HTLCDirection::Outbound => "outbound",
- };
+ for (payment_hash, payment_info) in inbound.deref() {
+ println!("");
+ println!("\t{{");
+ println!("\t\tamount_millisatoshis: {},", payment_info.amt_msat);
+ println!("\t\tpayment_hash: {},", hex_utils::hex_str(&payment_hash.0));
+ println!("\t\thtlc_direction: inbound,");
+ println!(
+ "\t\thtlc_status: {},",
+ match payment_info.status {
+ HTLCStatus::Pending => "pending",
+ HTLCStatus::Succeeded => "succeeded",
+ HTLCStatus::Failed => "failed",
+ }
+ );
+
+ println!("\t}},");
+ }
+
+ for (payment_hash, payment_info) in outbound.deref() {