File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -1675,7 +1675,7 @@ pub use self::fuzzy_internal_msgs::*;
1675
1675
pub ( crate ) use self :: fuzzy_internal_msgs:: * ;
1676
1676
1677
1677
/// BOLT 4 onion packet including hop data for the next peer.
1678
- #[ derive( Clone ) ]
1678
+ #[ derive( Clone , Hash , PartialEq , Eq ) ]
1679
1679
pub struct OnionPacket {
1680
1680
/// BOLT 4 version number.
1681
1681
pub version : u8 ,
@@ -1703,18 +1703,6 @@ impl onion_utils::Packet for OnionPacket {
1703
1703
}
1704
1704
}
1705
1705
1706
- impl Eq for OnionPacket { }
1707
- impl PartialEq for OnionPacket {
1708
- fn eq ( & self , other : & OnionPacket ) -> bool {
1709
- for ( i, j) in self . hop_data . iter ( ) . zip ( other. hop_data . iter ( ) ) {
1710
- if i != j { return false ; }
1711
- }
1712
- self . version == other. version &&
1713
- self . public_key == other. public_key &&
1714
- self . hmac == other. hmac
1715
- }
1716
- }
1717
-
1718
1706
impl fmt:: Debug for OnionPacket {
1719
1707
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
1720
1708
f. write_fmt ( format_args ! ( "OnionPacket version {} with hmac {:?}" , self . version, & self . hmac[ ..] ) )
You can’t perform that action at this time.
0 commit comments