Skip to content

Commit 90d9e2f

Browse files
committed
fix: old packet handler refs missed in refactor
1 parent 954543f commit 90d9e2f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ _default:
7373

7474
# Run benchmarks.
7575
bench:
76-
cargo +{{NIGHTLY_TOOLCHAIN}} bench --package bip324 --bench packet_handler
76+
cargo +{{NIGHTLY_TOOLCHAIN}} bench --package bip324 --bench cipher_session
7777

7878
# Run fuzz test: handshake.
7979
@fuzz target="handshake" time="60":
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ extern crate test;
55
use bip324::{CipherSession, Handshake, InboundCipher, Network, OutboundCipher, PacketType, Role};
66
use test::{black_box, Bencher};
77

8-
fn create_packet_handler_pair() -> (CipherSession, CipherSession) {
8+
fn create_cipher_session_pair() -> (CipherSession, CipherSession) {
99
// Create a proper handshake between Alice and Bob.
1010
let mut alice_init_buffer = vec![0u8; 64];
1111
let mut alice_handshake = Handshake::new(
@@ -62,7 +62,7 @@ fn create_packet_handler_pair() -> (CipherSession, CipherSession) {
6262
#[bench]
6363
fn bench_round_trip_small_packet(b: &mut Bencher) {
6464
let plaintext = b"Hello, World!"; // ~13 bytes.
65-
let (mut alice, mut bob) = create_packet_handler_pair();
65+
let (mut alice, mut bob) = create_cipher_session_pair();
6666

6767
b.iter(|| {
6868
// Encrypt the packet.
@@ -101,7 +101,7 @@ fn bench_round_trip_small_packet(b: &mut Bencher) {
101101
#[bench]
102102
fn bench_round_trip_large_packet(b: &mut Bencher) {
103103
let plaintext = vec![0u8; 4096]; // 4KB packet.
104-
let (mut alice, mut bob) = create_packet_handler_pair();
104+
let (mut alice, mut bob) = create_cipher_session_pair();
105105

106106
b.iter(|| {
107107
// Encrypt the packet.

protocol/tests/round_trips.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ fn regtest_handshake() {
147147
.authenticate_garbage_and_version(response, &mut packet_buffer)
148148
.unwrap();
149149
println!("Finalizing the handshake");
150-
let packet_handler = handshake.finalize().unwrap();
151-
let (mut decrypter, mut encrypter) = packet_handler.into_split();
150+
let cipher_session = handshake.finalize().unwrap();
151+
let (mut decrypter, mut encrypter) = cipher_session.into_split();
152152
let now = SystemTime::now()
153153
.duration_since(UNIX_EPOCH)
154154
.expect("time went backwards")

0 commit comments

Comments
 (0)