diff --git a/src/proto/peer/message.rs b/src/proto/peer/message.rs index f1c4e63..140358c 100644 --- a/src/proto/peer/message.rs +++ b/src/proto/peer/message.rs @@ -156,16 +156,21 @@ mod tests { use super::*; - fn roundtrip(input: T) { + fn roundtrip(input: Message) { let mut bytes = BytesMut::new(); input.encode(&mut ProtoEncoder::new(&mut bytes)).unwrap(); let mut cursor = io::Cursor::new(bytes); - let output = T::decode(&mut ProtoDecoder::new(&mut cursor)).unwrap(); + let output = Message::decode(&mut ProtoDecoder::new(&mut cursor)).unwrap(); assert_eq!(output, input); } + #[test] + fn roundtrip_pierce_firewall() { + roundtrip(Message::PierceFirewall(1337)) + } + #[test] fn roundtrip_peer_init() { roundtrip(Message::PeerInit(PeerInit {