Skip to content

Commit

Permalink
rebase to whats on main
Browse files Browse the repository at this point in the history
  • Loading branch information
Evanfeenstra committed Nov 14, 2023
1 parent 3ddb6aa commit ad173b3
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions lightning/src/ln/msgs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ pub use self::fuzzy_internal_msgs::*;
pub(crate) use self::fuzzy_internal_msgs::*;

/// BOLT 4 onion packet including hop data for the next peer.
#[derive(Clone)]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct OnionPacket {
/// BOLT 4 version number.
pub version: u8,
Expand Down Expand Up @@ -1703,18 +1703,6 @@ impl onion_utils::Packet for OnionPacket {
}
}

impl Eq for OnionPacket { }
impl PartialEq for OnionPacket {
fn eq(&self, other: &OnionPacket) -> bool {
for (i, j) in self.hop_data.iter().zip(other.hop_data.iter()) {
if i != j { return false; }
}
self.version == other.version &&
self.public_key == other.public_key &&
self.hmac == other.hmac
}
}

impl fmt::Debug for OnionPacket {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_fmt(format_args!("OnionPacket version {} with hmac {:?}", self.version, &self.hmac[..]))
Expand Down

0 comments on commit ad173b3

Please sign in to comment.