Skip to content

Commit e5e700c

Browse files
authored
Merge pull request #3279 from TheBlueMatt/2024-08-no-pub-usize
Use `u64` for `required_unknown_bits_from` indexes, not `usize`
2 parents caf0daa + 1d810a5 commit e5e700c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning-types/src/features.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ impl<T: sealed::Context> Features<T> {
911911
}
912912

913913
/// Returns the set of required features unknown by `other`, as their bit position.
914-
pub fn required_unknown_bits_from(&self, other: &Self) -> Vec<usize> {
914+
pub fn required_unknown_bits_from(&self, other: &Self) -> Vec<u64> {
915915
let mut unknown_bits = Vec::new();
916916

917917
// Bitwise AND-ing with all even bits set except for known features will select required
@@ -921,7 +921,7 @@ impl<T: sealed::Context> Features<T> {
921921
if byte & unknown_features != 0 {
922922
for bit in (0..8).step_by(2) {
923923
if ((byte & unknown_features) >> bit) & 1 == 1 {
924-
unknown_bits.push(i * 8 + bit);
924+
unknown_bits.push((i as u64) * 8 + bit);
925925
}
926926
}
927927
}

0 commit comments

Comments
 (0)