v1.6: Use blake3 message hash in status cache (#16507)

This commit is contained in:
Justin Starry
2021-04-13 16:57:20 +08:00
committed by GitHub
parent 81d636c2bf
commit 579065443a
30 changed files with 941 additions and 621 deletions

View File

@@ -39,9 +39,9 @@ impl Packet {
Self { data, meta }
}
pub fn from_data<T: Serialize>(dest: &SocketAddr, data: T) -> Result<Self> {
pub fn from_data<T: Serialize>(dest: Option<&SocketAddr>, data: T) -> Result<Self> {
let mut packet = Packet::default();
Self::populate_packet(&mut packet, Some(dest), &data)?;
Self::populate_packet(&mut packet, dest, &data)?;
Ok(packet)
}