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
+37-38Lines changed: 37 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -1088,55 +1088,54 @@ where
1088
1088
1089
1089
let um = gen_um_from_shared_secret(shared_secret.as_ref());
1090
1090
1091
-
// Check attr error hmacs
1092
-
1093
-
let message = &encrypted_packet.data;
1094
-
let payloads = &encrypted_packet.attribution_data.as_ref().unwrap()[..MAX_HOPS*PAYLOAD_LEN];// XXX: This will break if we get an err from an unupgraded node
1095
-
let hmacs = &encrypted_packet.attribution_data.as_ref().unwrap()[MAX_HOPS*PAYLOAD_LEN..];// XXX: This will break if we get an err from an unupgraded node
// log_debug!(logger, "Invalid HMAC in onion failure packet at pos {}", route_hop_idx);
1117
+
log_debug!(logger,"Invalid HMAC in attributable data for node at pos {}", route_hop_idx);
1118
1118
1119
-
return;
1120
-
}else{
1121
-
// log_debug!(logger, "Valid HMAC in onion failure packet at pos {}", route_hop_idx);
1122
-
}
1119
+
return;
1120
+
}
1123
1121
1124
-
// Shift payloads left.
1125
-
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
1126
-
payloads.copy_within(PAYLOAD_LEN..,0);
1122
+
// Shift payloads left.
1123
+
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
1124
+
payloads.copy_within(PAYLOAD_LEN..,0);
1127
1125
1128
-
// Shift hmacs left.
1129
-
let hmacs = &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
1130
-
letmut src_idx = MAX_HOPS;
1131
-
letmut dest_idx = 1;
1132
-
letmut copy_len = MAX_HOPS - 1;
1126
+
// Shift hmacs left.
1127
+
let hmacs = &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