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 {
674674
675675impl fmt::Display for ChannelId {
676676 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 )
678678 }
679679}
680680
@@ -7601,6 +7601,12 @@ mod tests {
76017601 assert_eq!(channel_id_2.bytes(), &data);
76027602 }
76037603
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+
76047610 #[test]
76057611 fn test_max_funding_satoshis_no_wumbo() {
76067612 assert_eq!(TOTAL_BITCOIN_SUPPLY_SATOSHIS, 21_000_000 * 100_000_000);
You can’t perform that action at this time.
0 commit comments