Skip to content

Commit

Permalink
Update binary_port.rs tests to reflect changes to error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zach Showalter committed Apr 23, 2024
1 parent a071390 commit 39d1150
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node/src/reactor/main_reactor/tests/binary_port.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{
collections::{BTreeMap, HashMap},
convert::TryInto,
convert::{TryFrom, TryInto},
iter,
sync::Arc,
time::Duration,
Expand Down Expand Up @@ -914,7 +914,7 @@ fn try_accept_transaction_invalid(rng: &mut TestRng) -> TestCase {
TestCase {
name: "try_accept_transaction_invalid",
request: BinaryRequest::TryAcceptTransaction { transaction },
asserter: Box::new(|response| response.error_code() == ErrorCode::InvalidTransaction as u8),
asserter: Box::new(|response| ErrorCode::try_from(response.error_code()).is_ok()),
}
}

Expand All @@ -923,6 +923,6 @@ fn try_spec_exec_invalid(rng: &mut TestRng) -> TestCase {
TestCase {
name: "try_spec_exec_invalid",
request: BinaryRequest::TrySpeculativeExec { transaction },
asserter: Box::new(|response| response.error_code() == ErrorCode::InvalidTransaction as u8),
asserter: Box::new(|response| ErrorCode::try_from(response.error_code()).is_ok()),
}
}

0 comments on commit 39d1150

Please sign in to comment.