From 53c79711b4c6ecc9715463398ec8c5e1c4806ffc Mon Sep 17 00:00:00 2001 From: Alec Chen Date: Sat, 22 Apr 2023 23:04:26 -0500 Subject: [PATCH] Add `PartialOrd`, `Ord` to `PaymentHash`, `PaymentPreimage` for tests --- lightning/src/ln/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lightning/src/ln/mod.rs b/lightning/src/ln/mod.rs index 340213c51..3a0efd386 100644 --- a/lightning/src/ln/mod.rs +++ b/lightning/src/ln/mod.rs @@ -73,11 +73,13 @@ pub use self::peer_channel_encryptor::LN_MAX_MSG_LEN; /// /// This is not exported to bindings users as we just use [u8; 32] directly #[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)] +#[cfg_attr(test, derive(PartialOrd, Ord))] pub struct PaymentHash(pub [u8; 32]); /// payment_preimage type, use to route payment between hop /// /// This is not exported to bindings users as we just use [u8; 32] directly #[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)] +#[cfg_attr(test, derive(PartialOrd, Ord))] pub struct PaymentPreimage(pub [u8; 32]); /// payment_secret type, use to authenticate sender to the receiver and tie MPP HTLCs together /// -- 2.39.5