From a3c15e8a4afdc0595fc55719d715142df17d4b89 Mon Sep 17 00:00:00 2001 From: Tommy Volk Date: Thu, 4 Jul 2024 09:54:10 -0500 Subject: [PATCH] chore: add ShortChannelId::to_u64 --- cln-rpc/src/primitives.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cln-rpc/src/primitives.rs b/cln-rpc/src/primitives.rs index 1d32786dfb0e..8d7ef03bb48f 100644 --- a/cln-rpc/src/primitives.rs +++ b/cln-rpc/src/primitives.rs @@ -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)] @@ -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]); } }