Fixed tests

This commit is contained in:
Dennis Schwerdel 2015-11-20 18:31:57 +01:00
parent 884d84be5b
commit 69e3db02d8
1 changed files with 2 additions and 2 deletions

View File

@ -217,8 +217,8 @@ fn encode_option_network_id() {
let msg = Message::GetPeers; let msg = Message::GetPeers;
let mut buf = [0; 1024]; let mut buf = [0; 1024];
let size = encode(&options, &msg, &mut buf[..]); let size = encode(&options, &msg, &mut buf[..]);
assert_eq!(size, 18); assert_eq!(size, 16);
assert_eq!(&buf[..size], &[118,112,110,0,0,0,1,2,0,8,0,0,0,0,0,0,0,134]); assert_eq!(&buf[..size], &[118,112,110,0,0,0,1,2,0,0,0,0,0,0,0,134]);
let (options2, msg2) = decode(&buf[..size]).unwrap(); let (options2, msg2) = decode(&buf[..size]).unwrap();
assert_eq!(options, options2); assert_eq!(options, options2);
assert_eq!(msg, msg2); assert_eq!(msg, msg2);