File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -674,7 +674,7 @@ impl ToHex for ChannelId {
674
674
675
675
impl fmt::Display for ChannelId {
676
676
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
677
- f.write_str (&self.to_hex() )
677
+ crate::util::logger::DebugBytes (&self.data).fmt(f )
678
678
}
679
679
}
680
680
@@ -7601,6 +7601,12 @@ mod tests {
7601
7601
assert_eq!(channel_id_2.bytes(), &data);
7602
7602
}
7603
7603
7604
+ #[test]
7605
+ fn test_channel_id_display() {
7606
+ let channel_id = ChannelId::from_bytes([42; 32]);
7607
+ assert_eq!(format!("{}", &channel_id), "2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a");
7608
+ }
7609
+
7604
7610
#[test]
7605
7611
fn test_max_funding_satoshis_no_wumbo() {
7606
7612
assert_eq!(TOTAL_BITCOIN_SUPPLY_SATOSHIS, 21_000_000 * 100_000_000);
You can’t perform that action at this time.
0 commit comments