Add Display to PaymentId & PaymentPreimage
[rust-lightning] / lightning / src / ln / channelmanager.rs
index 2177c1d7e18c8ca48a21ea3b51c8f454728726dd..7b752f176a46e0efbae38965208120ba358d63c7 100644 (file)
@@ -252,6 +252,12 @@ impl Readable for PaymentId {
        }
 }
 
+impl core::fmt::Display for PaymentId {
+       fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
+               crate::util::logger::DebugBytes(&self.0).fmt(f)
+       }
+}
+
 /// An identifier used to uniquely identify an intercepted HTLC to LDK.
 ///
 /// This is not exported to bindings users as we just use [u8; 32] directly