X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fmod.rs;h=92edb061165b04a9fe611c957dfdf43ada6dff1b;hb=d7e3320c030654ca3ff2b6ffd83ae65dfbe5e3c8;hp=3a0efd38690946cd5a7f48da324449d52f13fe2c;hpb=53c79711b4c6ecc9715463398ec8c5e1c4806ffc;p=rust-lightning diff --git a/lightning/src/ln/mod.rs b/lightning/src/ln/mod.rs index 3a0efd38..92edb061 100644 --- a/lightning/src/ln/mod.rs +++ b/lightning/src/ln/mod.rs @@ -72,19 +72,17 @@ pub use self::peer_channel_encryptor::LN_MAX_MSG_LEN; /// payment_hash type, use to cross-lock 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))] +#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug, Ord, PartialOrd)] 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))] +#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug, Ord, PartialOrd)] pub struct PaymentPreimage(pub [u8; 32]); /// payment_secret type, use to authenticate sender to the receiver and tie MPP HTLCs together /// /// This is not exported to bindings users as we just use [u8; 32] directly -#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)] +#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug, Ord, PartialOrd)] pub struct PaymentSecret(pub [u8; 32]); use crate::prelude::*;