PEX: Announce support and message definition

This commit is contained in:
Ivan 2024-08-24 18:18:07 +02:00 committed by Igor Katson
parent c758d0022d
commit bbc951733f
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
7 changed files with 213 additions and 35 deletions

View file

@ -57,7 +57,7 @@ impl ReadBuf {
anyhow::bail!("peer disconnected while reading handshake");
}
let (h, size) = Handshake::deserialize(&self.buf[..self.filled])
.map_err(|e| anyhow::anyhow!("error deserializing handshake: {:?}", e))?;
.map_err(|e| anyhow::anyhow!("error deserializing handshake: {:?} hadshake data {:?}", e, &self.buf[..self.filled.min(19)]))?;
self.processed = size;
Ok(h)
}