Fixed outgoing ack size

This commit is contained in:
arkpar 2016-02-27 16:40:22 +01:00
parent faa6347896
commit e6bab014d1

View File

@ -367,7 +367,7 @@ impl Handshake {
let encoded = rlp.drain();
let len = (encoded.len() + ECIES_OVERHEAD) as u16;
let prefix = [ (len & 0xff) as u8, (len >> 8) as u8 ];
let prefix = [ (len >> 8) as u8, (len & 0xff) as u8 ];
let message = try!(crypto::ecies::encrypt(&self.id, &prefix, &encoded));
self.ack_cipher.extend_from_slice(&prefix);
self.ack_cipher.extend_from_slice(&message);