diff --git a/roles/tests-integration/lib/sniffer.rs b/roles/tests-integration/lib/sniffer.rs index 6926ccca59..caca20eb4c 100644 --- a/roles/tests-integration/lib/sniffer.rs +++ b/roles/tests-integration/lib/sniffer.rs @@ -6,7 +6,7 @@ use key_utils::{Secp256k1PublicKey, Secp256k1SecretKey}; use network_helpers_sv2::noise_connection_tokio::Connection; use roles_logic_sv2::{ parsers::{ - AnyMessage, CommonMessages, + AnyMessage, CommonMessages, IsSv2Message, JobDeclaration::{ AllocateMiningJobToken, AllocateMiningJobTokenSuccess, DeclareMiningJob, DeclareMiningJobError, DeclareMiningJobSuccess, IdentifyTransactions, @@ -70,7 +70,6 @@ pub struct InterceptMessage { direction: MessageDirection, expected_message_type: MsgType, response_message: PoolMessages<'static>, - response_message_type: MsgType, break_on: bool, } @@ -79,14 +78,12 @@ impl InterceptMessage { direction: MessageDirection, expected_message_type: MsgType, response_message: PoolMessages<'static>, - response_message_type: MsgType, break_on: bool, ) -> Self { Self { direction, expected_message_type, response_message, - response_message_type, break_on, } } @@ -235,7 +232,7 @@ impl Sniffer { let frame = StandardEitherFrame::>::Sv2( Sv2Frame::from_message( intercept_message.response_message.clone(), - intercept_message.response_message_type, + intercept_message.response_message.message_type(), extension_type, channel_msg, ) @@ -277,7 +274,7 @@ impl Sniffer { let frame = StandardEitherFrame::>::Sv2( Sv2Frame::from_message( intercept_message.response_message.clone(), - intercept_message.response_message_type, + intercept_message.response_message.message_type(), extension_type, channel_msg, ) diff --git a/roles/tests-integration/tests/sniffer_integration.rs b/roles/tests-integration/tests/sniffer_integration.rs index 84b3294b4f..dd1a987421 100644 --- a/roles/tests-integration/tests/sniffer_integration.rs +++ b/roles/tests-integration/tests/sniffer_integration.rs @@ -1,7 +1,4 @@ -use const_sv2::{ - MESSAGE_TYPE_SETUP_CONNECTION_ERROR, MESSAGE_TYPE_SETUP_CONNECTION_SUCCESS, - MESSAGE_TYPE_SET_NEW_PREV_HASH, -}; +use const_sv2::{MESSAGE_TYPE_SETUP_CONNECTION_SUCCESS, MESSAGE_TYPE_SET_NEW_PREV_HASH}; use integration_tests_sv2::*; use roles_logic_sv2::{ common_messages_sv2::SetupConnectionError, @@ -26,7 +23,6 @@ async fn test_sniffer_interrupter() { MessageDirection::ToDownstream, MESSAGE_TYPE_SETUP_CONNECTION_SUCCESS, message, - MESSAGE_TYPE_SETUP_CONNECTION_ERROR, true, ); let (sniffer, sniffer_addr) =