Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronFeickert committed Jan 24, 2023
1 parent e85fc03 commit 0ac3c70
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions comms/dht/src/inbound/decryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,11 +660,18 @@ mod test {

// Encrypt an empty message
for identity in [&node_identity, &other_identity] {
let mut message = make_dht_inbound_message(identity, &Vec::new(), DhtMessageFlags::ENCRYPTED, true, true).unwrap();
let mut message =
make_dht_inbound_message(identity, &Vec::new(), DhtMessageFlags::ENCRYPTED, true, true).unwrap();
message.body = Vec::new(); // due to padding, we need to manually reset this

// Ban the peer
expect_error(node_identity.clone(), message, DecryptionError::EncryptedMessageEmptyBody, true).await;
expect_error(
node_identity.clone(),
message,
DecryptionError::EncryptedMessageEmptyBody,
true,
)
.await;
}
}

Expand Down

0 comments on commit 0ac3c70

Please sign in to comment.