projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rewrite Channel resend tracking to make it much more reliable
[rust-lightning]
/
src
/
util
/
byte_utils.rs
diff --git
a/src/util/byte_utils.rs
b/src/util/byte_utils.rs
index 7230a4e1ce187e2eb1ff4f2c8f68dc9d6301b2ef..44445666f776644947320cacac39fd0c9b57c982 100644
(file)
--- a/
src/util/byte_utils.rs
+++ b/
src/util/byte_utils.rs
@@
-10,6
+10,7
@@
pub fn slice_to_be32(v: &[u8]) -> u32 {
((v[2] as u32) << 8*1) |
((v[3] as u32) << 8*0)
}
((v[2] as u32) << 8*1) |
((v[3] as u32) << 8*0)
}
+#[cfg(not(feature = "fuzztarget"))] // Used only by poly1305
#[inline]
pub fn slice_to_le32(v: &[u8]) -> u32 {
((v[0] as u32) << 8*0) |
#[inline]
pub fn slice_to_le32(v: &[u8]) -> u32 {
((v[0] as u32) << 8*0) |
@@
-54,6
+55,7
@@
pub fn be32_to_array(u: u32) -> [u8; 4] {
v[3] = ((u >> 8*0) & 0xff) as u8;
v
}
v[3] = ((u >> 8*0) & 0xff) as u8;
v
}
+#[cfg(not(feature = "fuzztarget"))] // Used only by poly1305
#[inline]
pub fn le32_to_array(u: u32) -> [u8; 4] {
let mut v = [0; 4];
#[inline]
pub fn le32_to_array(u: u32) -> [u8; 4] {
let mut v = [0; 4];