mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
chore: add ShortChannelId::to_u64
This commit is contained in:
parent
242ecbc906
commit
a3c15e8a4a
1 changed files with 4 additions and 1 deletions
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue