Skip to content

Commit 53c7971

Browse files
committed
Add PartialOrd, Ord to PaymentHash, PaymentPreimage for tests
1 parent 9d5adfc commit 53c7971

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lightning/src/ln/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ pub use self::peer_channel_encryptor::LN_MAX_MSG_LEN;
7373
///
7474
/// This is not exported to bindings users as we just use [u8; 32] directly
7575
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)]
76+
#[cfg_attr(test, derive(PartialOrd, Ord))]
7677
pub struct PaymentHash(pub [u8; 32]);
7778
/// payment_preimage type, use to route payment between hop
7879
///
7980
/// This is not exported to bindings users as we just use [u8; 32] directly
8081
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)]
82+
#[cfg_attr(test, derive(PartialOrd, Ord))]
8183
pub struct PaymentPreimage(pub [u8; 32]);
8284
/// payment_secret type, use to authenticate sender to the receiver and tie MPP HTLCs together
8385
///

0 commit comments

Comments
 (0)