+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
+ }
+}
+
+#[derive(Clone, PartialEq)]