You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lightning/src/ln/onion_utils.rs
+15-2Lines changed: 15 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1016,6 +1016,8 @@ where
1016
1016
constNODE:u16 = 0x2000;
1017
1017
constUPDATE:u16 = 0x1000;
1018
1018
1019
+
letmut hold_times:Vec<u32> = Vec::new();
1020
+
1019
1021
// Handle packed channel/node updates for passing back for the route handler
1020
1022
let callback = |shared_secret, _, _,route_hop_opt:Option<&RouteHop>, route_hop_idx| {
1021
1023
if res.is_some(){
@@ -1119,6 +1121,12 @@ where
1119
1121
return;
1120
1122
}
1121
1123
1124
+
// Record hold time.
1125
+
let hold_time:u32 = u32::from_be_bytes(payloads[..PAYLOAD_LEN].try_into().unwrap());
1126
+
hold_times.push(hold_time);
1127
+
1128
+
log_debug!(logger,"Htlc hold time at pos {}: {} ms", route_hop_idx, hold_time);
1129
+
1122
1130
// Shift payloads left.
1123
1131
let payloads = &mut encrypted_packet.attribution_data.as_mut().unwrap()[..MAX_HOPS*PAYLOAD_LEN];// XXX: This will break if we get an err from an unupgraded node
0 commit comments