@@ -25,7 +25,7 @@ use lander::{
2525use crate :: msg:: op_queue:: OpQueue ;
2626use crate :: server:: operations:: message_retry:: MessageRetryRequest ;
2727
28- use super :: super :: confirm_already_submitted_operations ;
28+ use super :: super :: filter_operations_for_preparation ;
2929
3030// Mock QueueOperation for testing
3131#[ derive( Debug , Serialize , Clone ) ]
@@ -294,14 +294,14 @@ fn create_test_queue() -> OpQueue {
294294}
295295
296296#[ tokio:: test]
297- async fn test_confirm_already_submitted_operations_empty_batch ( ) {
297+ async fn test_filter_operations_for_preparation_empty_batch ( ) {
298298 let mock_db = MockHyperlaneDb :: new ( ) ;
299299 let mock_entrypoint = MockDispatcherEntrypoint :: new ( ) ;
300300 let confirm_queue = create_test_queue ( ) ;
301301
302302 let batch = vec ! [ ] ;
303303
304- let result = confirm_already_submitted_operations (
304+ let result = filter_operations_for_preparation (
305305 Arc :: new ( mock_entrypoint) as Arc < dyn Entrypoint + Send + Sync > ,
306306 & confirm_queue,
307307 Arc :: new ( mock_db) as Arc < dyn HyperlaneDb > ,
@@ -321,7 +321,7 @@ async fn test_confirm_already_submitted_operations_empty_batch() {
321321}
322322
323323#[ tokio:: test]
324- async fn test_confirm_already_submitted_operations_all_manual_retry ( ) {
324+ async fn test_filter_operations_for_preparation_all_manual_retry ( ) {
325325 let mut mock_db = MockHyperlaneDb :: new ( ) ;
326326 let mut mock_entrypoint = MockDispatcherEntrypoint :: new ( ) ;
327327 let confirm_queue = create_test_queue ( ) ;
@@ -345,7 +345,7 @@ async fn test_confirm_already_submitted_operations_all_manual_retry() {
345345
346346 let batch = vec ! [ op1, op2, op3] ;
347347
348- let result = confirm_already_submitted_operations (
348+ let result = filter_operations_for_preparation (
349349 Arc :: new ( mock_entrypoint) as Arc < dyn Entrypoint + Send + Sync > ,
350350 & confirm_queue,
351351 Arc :: new ( mock_db) as Arc < dyn HyperlaneDb > ,
@@ -369,7 +369,7 @@ async fn test_confirm_already_submitted_operations_all_manual_retry() {
369369}
370370
371371#[ tokio:: test]
372- async fn test_confirm_already_submitted_operations_all_submitted ( ) {
372+ async fn test_filter_operations_for_preparation_all_submitted ( ) {
373373 let mut mock_db = MockHyperlaneDb :: new ( ) ;
374374 let mut mock_entrypoint = MockDispatcherEntrypoint :: new ( ) ;
375375 let confirm_queue = create_test_queue ( ) ;
@@ -413,7 +413,7 @@ async fn test_confirm_already_submitted_operations_all_submitted() {
413413
414414 let batch = vec ! [ op1, op2, op3] ;
415415
416- let result = confirm_already_submitted_operations (
416+ let result = filter_operations_for_preparation (
417417 Arc :: new ( mock_entrypoint) as Arc < dyn Entrypoint + Send + Sync > ,
418418 & confirm_queue,
419419 Arc :: new ( mock_db) as Arc < dyn HyperlaneDb > ,
@@ -437,7 +437,7 @@ async fn test_confirm_already_submitted_operations_all_submitted() {
437437}
438438
439439#[ tokio:: test]
440- async fn test_confirm_already_submitted_operations_none_submitted ( ) {
440+ async fn test_filter_operations_for_preparation_none_submitted ( ) {
441441 let mut mock_db = MockHyperlaneDb :: new ( ) ;
442442 let mut mock_entrypoint = MockDispatcherEntrypoint :: new ( ) ;
443443 let confirm_queue = create_test_queue ( ) ;
@@ -459,7 +459,7 @@ async fn test_confirm_already_submitted_operations_none_submitted() {
459459
460460 let batch = vec ! [ op1, op2] ;
461461
462- let result = confirm_already_submitted_operations (
462+ let result = filter_operations_for_preparation (
463463 Arc :: new ( mock_entrypoint) as Arc < dyn Entrypoint + Send + Sync > ,
464464 & confirm_queue,
465465 Arc :: new ( mock_db) as Arc < dyn HyperlaneDb > ,
@@ -483,7 +483,7 @@ async fn test_confirm_already_submitted_operations_none_submitted() {
483483}
484484
485485#[ tokio:: test]
486- async fn test_confirm_already_submitted_operations_mixed_batch ( ) {
486+ async fn test_filter_operations_for_preparation_mixed_batch ( ) {
487487 let mut mock_db = MockHyperlaneDb :: new ( ) ;
488488 let mut mock_entrypoint = MockDispatcherEntrypoint :: new ( ) ;
489489 let confirm_queue = create_test_queue ( ) ;
@@ -539,7 +539,7 @@ async fn test_confirm_already_submitted_operations_mixed_batch() {
539539
540540 let batch = vec ! [ op1, op2, op3, op4] ;
541541
542- let result = confirm_already_submitted_operations (
542+ let result = filter_operations_for_preparation (
543543 Arc :: new ( mock_entrypoint) as Arc < dyn Entrypoint + Send + Sync > ,
544544 & confirm_queue,
545545 Arc :: new ( mock_db) as Arc < dyn HyperlaneDb > ,
@@ -574,7 +574,7 @@ async fn test_confirm_already_submitted_operations_mixed_batch() {
574574}
575575
576576#[ tokio:: test]
577- async fn test_confirm_already_submitted_operations_db_error ( ) {
577+ async fn test_filter_operations_for_preparation_db_error ( ) {
578578 let mut mock_db = MockHyperlaneDb :: new ( ) ;
579579 let mut mock_entrypoint = MockDispatcherEntrypoint :: new ( ) ;
580580 let confirm_queue = create_test_queue ( ) ;
@@ -597,7 +597,7 @@ async fn test_confirm_already_submitted_operations_db_error() {
597597 let op = Box :: new ( MockQueueOperation :: with_first_prepare ( message_id) ) as QueueOperation ;
598598 let batch = vec ! [ op] ;
599599
600- let result = confirm_already_submitted_operations (
600+ let result = filter_operations_for_preparation (
601601 Arc :: new ( mock_entrypoint) as Arc < dyn Entrypoint + Send + Sync > ,
602602 & confirm_queue,
603603 Arc :: new ( mock_db) as Arc < dyn HyperlaneDb > ,
@@ -622,7 +622,7 @@ async fn test_confirm_already_submitted_operations_db_error() {
622622}
623623
624624#[ tokio:: test]
625- async fn test_confirm_already_submitted_operations_payload_dropped ( ) {
625+ async fn test_filter_operations_for_preparation_payload_dropped ( ) {
626626 let mut mock_db = MockHyperlaneDb :: new ( ) ;
627627 let mut mock_entrypoint = MockDispatcherEntrypoint :: new ( ) ;
628628 let confirm_queue = create_test_queue ( ) ;
@@ -644,7 +644,7 @@ async fn test_confirm_already_submitted_operations_payload_dropped() {
644644 let op = Box :: new ( MockQueueOperation :: with_first_prepare ( message_id) ) as QueueOperation ;
645645 let batch = vec ! [ op] ;
646646
647- let result = confirm_already_submitted_operations (
647+ let result = filter_operations_for_preparation (
648648 Arc :: new ( mock_entrypoint) as Arc < dyn Entrypoint + Send + Sync > ,
649649 & confirm_queue,
650650 Arc :: new ( mock_db) as Arc < dyn HyperlaneDb > ,
@@ -669,7 +669,7 @@ async fn test_confirm_already_submitted_operations_payload_dropped() {
669669}
670670
671671#[ tokio:: test]
672- async fn test_confirm_already_submitted_operations_transaction_dropped ( ) {
672+ async fn test_filter_operations_for_preparation_transaction_dropped ( ) {
673673 let mut mock_db = MockHyperlaneDb :: new ( ) ;
674674 let mut mock_entrypoint = MockDispatcherEntrypoint :: new ( ) ;
675675 let confirm_queue = create_test_queue ( ) ;
@@ -695,7 +695,7 @@ async fn test_confirm_already_submitted_operations_transaction_dropped() {
695695 let op = Box :: new ( MockQueueOperation :: with_first_prepare ( message_id) ) as QueueOperation ;
696696 let batch = vec ! [ op] ;
697697
698- let result = confirm_already_submitted_operations (
698+ let result = filter_operations_for_preparation (
699699 Arc :: new ( mock_entrypoint) as Arc < dyn Entrypoint + Send + Sync > ,
700700 & confirm_queue,
701701 Arc :: new ( mock_db) as Arc < dyn HyperlaneDb > ,
@@ -720,7 +720,7 @@ async fn test_confirm_already_submitted_operations_transaction_dropped() {
720720}
721721
722722#[ tokio:: test]
723- async fn test_confirm_already_submitted_operations_entrypoint_error ( ) {
723+ async fn test_filter_operations_for_preparation_entrypoint_error ( ) {
724724 let mut mock_db = MockHyperlaneDb :: new ( ) ;
725725 let mut mock_entrypoint = MockDispatcherEntrypoint :: new ( ) ;
726726 let confirm_queue = create_test_queue ( ) ;
@@ -742,7 +742,7 @@ async fn test_confirm_already_submitted_operations_entrypoint_error() {
742742 let op = Box :: new ( MockQueueOperation :: with_first_prepare ( message_id) ) as QueueOperation ;
743743 let batch = vec ! [ op] ;
744744
745- let result = confirm_already_submitted_operations (
745+ let result = filter_operations_for_preparation (
746746 Arc :: new ( mock_entrypoint) as Arc < dyn Entrypoint + Send + Sync > ,
747747 & confirm_queue,
748748 Arc :: new ( mock_db) as Arc < dyn HyperlaneDb > ,
@@ -767,7 +767,7 @@ async fn test_confirm_already_submitted_operations_entrypoint_error() {
767767}
768768
769769#[ tokio:: test]
770- async fn test_confirm_already_submitted_operations_non_manual_retry ( ) {
770+ async fn test_filter_operations_for_preparation_non_manual_retry ( ) {
771771 let mut mock_db = MockHyperlaneDb :: new ( ) ;
772772 let mut mock_entrypoint = MockDispatcherEntrypoint :: new ( ) ;
773773 let confirm_queue = create_test_queue ( ) ;
@@ -794,7 +794,7 @@ async fn test_confirm_already_submitted_operations_non_manual_retry() {
794794 ) ) as QueueOperation ;
795795 let batch = vec ! [ op] ;
796796
797- let result = confirm_already_submitted_operations (
797+ let result = filter_operations_for_preparation (
798798 Arc :: new ( mock_entrypoint) as Arc < dyn Entrypoint + Send + Sync > ,
799799 & confirm_queue,
800800 Arc :: new ( mock_db) as Arc < dyn HyperlaneDb > ,
@@ -818,7 +818,7 @@ async fn test_confirm_already_submitted_operations_non_manual_retry() {
818818}
819819
820820#[ tokio:: test]
821- async fn test_confirm_already_submitted_operations_empty_payload_uuids ( ) {
821+ async fn test_filter_operations_for_preparation_empty_payload_uuids ( ) {
822822 let mut mock_db = MockHyperlaneDb :: new ( ) ;
823823 let mut mock_entrypoint = MockDispatcherEntrypoint :: new ( ) ;
824824 let confirm_queue = create_test_queue ( ) ;
@@ -837,7 +837,7 @@ async fn test_confirm_already_submitted_operations_empty_payload_uuids() {
837837 let op = Box :: new ( MockQueueOperation :: with_first_prepare ( message_id) ) as QueueOperation ;
838838 let batch = vec ! [ op] ;
839839
840- let result = confirm_already_submitted_operations (
840+ let result = filter_operations_for_preparation (
841841 Arc :: new ( mock_entrypoint) as Arc < dyn Entrypoint + Send + Sync > ,
842842 & confirm_queue,
843843 Arc :: new ( mock_db) as Arc < dyn HyperlaneDb > ,
0 commit comments