Skip to content

Commit

Permalink
clean up logs
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Nov 19, 2024
1 parent b1dcb13 commit b5e9db3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
5 changes: 0 additions & 5 deletions src/fiber/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -881,12 +881,7 @@ where
.expect("public channel exits")
.tlc_fee_proportional_millionths
.unwrap_or_default();
info!("expecting fee_rate: {}", fee_rate);
let expected_fee = calculate_tlc_forward_fee(forward_amount, fee_rate);
info!(
"forward_fee: {} expected_fee: {}",
forward_fee, expected_fee
);
if forward_fee < expected_fee {
error!(
"too low forward_fee: {}, expected_fee: {}",
Expand Down
24 changes: 0 additions & 24 deletions src/fiber/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,8 @@ where
&channel, &update
);
let update_info = if update.message_flags & 1 == 1 {
debug!("now update node1_to_node2: {:?}", &update);
&mut channel.node1_to_node2
} else {
debug!("now update node2_to_node1: {:?}", &update);
&mut channel.node2_to_node1
};

Expand Down Expand Up @@ -440,7 +438,6 @@ where
last_update_message: update.clone(),
});

info!("now new update_info: {:?}", *update_info);
self.store.insert_channel(channel.to_owned());
debug!(
"Processed channel update: channel {:?}, update {:?}",
Expand Down Expand Up @@ -602,10 +599,6 @@ where
let fee_rate = channel_update.fee_rate;
let fee = calculate_tlc_forward_fee(current_amount, fee_rate as u128);
let expiry = channel_update.htlc_expiry_delta;
eprintln!(
"fee: {:?}, expiry: {:?}, current_amount: {:?}, fee_rate: {:?}",
fee, expiry, current_amount, fee_rate
);
(fee, expiry)
};

Expand Down Expand Up @@ -729,7 +722,6 @@ where
.values()
.any(|x| x == &channel_info.out_point())
{
eprintln!("here ......");
continue;
}

Expand All @@ -740,15 +732,9 @@ where
let fee = calculate_tlc_forward_fee(next_hop_received_amount, fee_rate as u128);
let amount_to_send = next_hop_received_amount + fee;

eprintln!("amount_to_send: {:?}", amount_to_send);
// if the amount to send is greater than the amount we have, skip this edge
if let Some(max_fee_amount) = max_fee_amount {
if amount_to_send > amount + max_fee_amount {
eprintln!(
"amount_to_send {} > amount + max_fee_amount {}",
amount_to_send,
amount + max_fee_amount
);
continue;
}
}
Expand All @@ -758,13 +744,6 @@ where
|| (channel_update.htlc_maximum_value != 0
&& amount_to_send > channel_update.htlc_maximum_value)
{
eprintln!(
"now .......amount: {:?} capacity: {:?}, channel_update.htlc_maximum_value: {:?}",
amount_to_send,
channel_info.capacity(),
channel_update.htlc_maximum_value

);
continue;
}
if amount_to_send < channel_update.htlc_minimum_value {
Expand All @@ -786,7 +765,6 @@ where
);

if probability < DEFAULT_MIN_PROBABILITY {
eprintln!("probability < DEFAULT_MIN_PROBABILITY");
continue;
}
let agg_weight =
Expand All @@ -799,8 +777,6 @@ where
continue;
}
}
eprintln!("\n\nfind_path from: {:?}, to: {:?}", from, to);
eprintln!("add use channel_info: {:?}\n\n", channel_info);
let node = NodeHeapElement {
node_id: from,
weight,
Expand Down

0 comments on commit b5e9db3

Please sign in to comment.