diff --git a/warzone/crates/warzone-protocol/src/identity.rs b/warzone/crates/warzone-protocol/src/identity.rs index a15c9cf..e7e2f2e 100644 --- a/warzone/crates/warzone-protocol/src/identity.rs +++ b/warzone/crates/warzone-protocol/src/identity.rs @@ -175,8 +175,8 @@ mod tests { let id = seed.derive_identity(); let pub_id = id.public_identity(); let fp_str = pub_id.fingerprint.to_string(); - // Format: xxxx:xxxx:xxxx:xxxx - assert_eq!(fp_str.len(), 19); - assert_eq!(fp_str.chars().filter(|c| *c == ':').count(), 3); + // Format: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx + assert_eq!(fp_str.len(), 39); + assert_eq!(fp_str.chars().filter(|c| *c == ':').count(), 7); } } diff --git a/warzone/crates/warzone-protocol/src/types.rs b/warzone/crates/warzone-protocol/src/types.rs index de4e375..2891f0c 100644 --- a/warzone/crates/warzone-protocol/src/types.rs +++ b/warzone/crates/warzone-protocol/src/types.rs @@ -10,11 +10,15 @@ impl fmt::Display for Fingerprint { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( f, - "{:04x}:{:04x}:{:04x}:{:04x}", + "{:04x}:{:04x}:{:04x}:{:04x}:{:04x}:{:04x}:{:04x}:{:04x}", u16::from_be_bytes([self.0[0], self.0[1]]), u16::from_be_bytes([self.0[2], self.0[3]]), u16::from_be_bytes([self.0[4], self.0[5]]), u16::from_be_bytes([self.0[6], self.0[7]]), + u16::from_be_bytes([self.0[8], self.0[9]]), + u16::from_be_bytes([self.0[10], self.0[11]]), + u16::from_be_bytes([self.0[12], self.0[13]]), + u16::from_be_bytes([self.0[14], self.0[15]]), ) } }