Skip to content

Commit

Permalink
chore: add ShortChannelId::to_u64
Browse files Browse the repository at this point in the history
  • Loading branch information
tvolk131 authored and cdecker committed Jul 10, 2024
1 parent 242ecbc commit a3c15e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cln-rpc/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ impl ShortChannelId {
pub fn outnum(&self) -> u16 {
self.0 as u16 & 0xFFFF
}
pub fn to_u64(&self) -> u64 {
self.0
}
}

#[derive(Clone, Copy, Debug)]
Expand Down Expand Up @@ -793,7 +796,7 @@ mod test {
});

let p: FundchannelResponse = serde_json::from_value(r).unwrap();
assert_eq!(p.channel_type.unwrap().bits, vec![1,3,5]);
assert_eq!(p.channel_type.unwrap().bits, vec![1, 3, 5]);
}
}

Expand Down

0 comments on commit a3c15e8

Please sign in to comment.