@@ -49,8 +49,6 @@ pub struct Downstream {
4949 pub downstream_channel_state : DownstreamChannelState ,
5050 // Flag to track if SV1 handshake is complete (subscribe + authorize)
5151 pub sv1_handshake_complete : Arc < AtomicBool > ,
52- // Flag to indicate we're processing queued Sv1 handshake message responses
53- pub processing_queued_sv1_handshake_responses : Arc < AtomicBool > ,
5452}
5553
5654#[ cfg_attr( not( test) , hotpath:: measure_all) ]
@@ -84,7 +82,6 @@ impl Downstream {
8482 downstream_data,
8583 downstream_channel_state,
8684 sv1_handshake_complete : Arc :: new ( AtomicBool :: new ( false ) ) ,
87- processing_queued_sv1_handshake_responses : Arc :: new ( AtomicBool :: new ( false ) ) ,
8885 }
8986 }
9087
@@ -201,11 +198,6 @@ impl Downstream {
201198 return Ok ( ( ) ) ; // Message not intended for this downstream
202199 }
203200
204- // Check if this is a queued message response
205- let is_queued_sv1_handshake_response = self
206- . processing_queued_sv1_handshake_responses
207- . load ( Ordering :: SeqCst ) ;
208-
209201 // Handle messages based on message type and handshake state
210202 if let Message :: Notification ( notification) = & message {
211203 // For notifications (mining.set_difficulty, mining.notify), only send if
@@ -328,22 +320,8 @@ impl Downstream {
328320 }
329321 }
330322 }
331- } else if is_queued_sv1_handshake_response {
332- // For non-notification messages, send if processing queued handshake responses
333- self . downstream_channel_state
334- . downstream_sv1_sender
335- . send ( message. clone ( ) )
336- . await
337- . map_err ( |e| {
338- error ! ( "Down: Failed to send queued message to downstream: {:?}" , e) ;
339- TproxyError :: disconnect (
340- TproxyErrorKind :: ChannelErrorSender ,
341- downstream_id. unwrap_or ( 0 ) ,
342- )
343- } ) ?;
344323 } else {
345- // Neither handshake complete nor queued response - skip non-notification
346- // messages
324+ // Handshake not complete - skip non-notification messages.
347325 debug ! ( "Down: SV1 handshake not complete, skipping non-notification message" ) ;
348326 }
349327 }
0 commit comments