@@ -761,149 +761,3 @@ fn assert_commit_result(expected: &[ExitCode], result: &ProveCommitSectors3Retur
761
761
assert_eq ! ( BatchReturn :: of( expected) , result. activation_results) ;
762
762
}
763
763
764
- #[ test]
765
- fn notify_non_market_actor ( ) {
766
- let ( h, mut rt) = setup_basic ( ) ;
767
- let piece_size = h. sector_size as u64 ;
768
- let precommits = precommit_sectors ( & mut rt, & h, & [ & [ piece_size] , & [ piece_size] ] ) ;
769
- let snos: Vec < SectorNumber > =
770
- precommits. iter ( ) . map ( |pci : & SectorPreCommitInfo | pci. sector_number ) . collect ( ) ;
771
-
772
- // Create notifications to different actors, not just STORAGE_MARKET_ACTOR
773
- let custom_actor_1 = Address :: new_id ( 5000 ) ;
774
- let custom_actor_2 = Address :: new_id ( 6000 ) ;
775
- let evm_actor = Address :: new_actor ( b"evm_test_actor" ) ;
776
-
777
- let mut manifests = vec ! [
778
- make_activation_manifest( snos[ 0 ] , & [ ( piece_size, CLIENT_ID , 1000 , 0 ) ] ) ,
779
- make_activation_manifest( snos[ 1 ] , & [ ( piece_size, CLIENT_ID , 1001 , 0 ) ] ) ,
780
- ] ;
781
-
782
- // Add notifications to custom actors
783
- manifests[ 0 ] . pieces [ 0 ] . notify . push ( DataActivationNotification {
784
- address : custom_actor_1,
785
- payload : RawBytes :: from ( vec ! [ 1 , 2 , 3 , 4 ] ) ,
786
- } ) ;
787
- manifests[ 0 ] . pieces [ 0 ] . notify . push ( DataActivationNotification {
788
- address : evm_actor,
789
- payload : RawBytes :: from ( vec ! [ 5 , 6 , 7 , 8 ] ) ,
790
- } ) ;
791
- manifests[ 1 ] . pieces [ 0 ] . notify . push ( DataActivationNotification {
792
- address : custom_actor_2,
793
- payload : RawBytes :: from ( vec ! [ 9 , 10 , 11 , 12 ] ) ,
794
- } ) ;
795
-
796
- // Expect notifications to be sent to the custom actors
797
- rt. expect_send_simple (
798
- custom_actor_1,
799
- SECTOR_CONTENT_CHANGED ,
800
- None , // The actual params will be set by the notification system
801
- TokenAmount :: zero ( ) ,
802
- None , // Return value
803
- ExitCode :: OK ,
804
- ) ;
805
- rt. expect_send_simple (
806
- evm_actor,
807
- SECTOR_CONTENT_CHANGED ,
808
- None , // The actual params will be set by the notification system
809
- TokenAmount :: zero ( ) ,
810
- None , // Return value
811
- ExitCode :: OK ,
812
- ) ;
813
- rt. expect_send_simple (
814
- custom_actor_2,
815
- SECTOR_CONTENT_CHANGED ,
816
- None , // The actual params will be set by the notification system
817
- TokenAmount :: zero ( ) ,
818
- None , // Return value
819
- ExitCode :: OK ,
820
- ) ;
821
-
822
- let cfg = ProveCommitSectors3Config :: default ( ) ;
823
- let ( result, _, _) =
824
- h. prove_commit_sectors3 ( & rt, & manifests, false , false , false , cfg) . unwrap ( ) ;
825
-
826
- // All sectors succeed
827
- assert_commit_result ( & [ ExitCode :: OK ; 2 ] , & result) ;
828
- verify_weights ( & rt, & h, snos[ 0 ] , 0 , piece_size) ;
829
- verify_weights ( & rt, & h, snos[ 1 ] , 0 , piece_size) ;
830
- }
831
-
832
- #[ test]
833
- fn notify_multiple_actors_per_piece ( ) {
834
- let ( h, mut rt) = setup_basic ( ) ;
835
- let piece_size = h. sector_size as u64 / 2 ;
836
- let precommits = precommit_sectors ( & mut rt, & h, & [ & [ piece_size, piece_size] ] ) ;
837
- let snos: Vec < SectorNumber > =
838
- precommits. iter ( ) . map ( |pci : & SectorPreCommitInfo | pci. sector_number ) . collect ( ) ;
839
-
840
- let mut manifests = vec ! [
841
- make_activation_manifest(
842
- snos[ 0 ] ,
843
- & [ ( piece_size, CLIENT_ID , 1000 , 0 ) , ( piece_size, CLIENT_ID , 1001 , 0 ) ] ,
844
- ) ,
845
- ] ;
846
-
847
- // Add notifications to multiple different actors for the same piece
848
- let actor1 = Address :: new_id ( 7000 ) ;
849
- let actor2 = Address :: new_id ( 8000 ) ;
850
- let actor3 = Address :: new_id ( 9000 ) ;
851
-
852
- manifests[ 0 ] . pieces [ 0 ] . notify . push ( DataActivationNotification {
853
- address : actor1,
854
- payload : RawBytes :: from ( vec ! [ 1 , 1 , 1 , 1 ] ) ,
855
- } ) ;
856
- manifests[ 0 ] . pieces [ 0 ] . notify . push ( DataActivationNotification {
857
- address : actor2,
858
- payload : RawBytes :: from ( vec ! [ 2 , 2 , 2 , 2 ] ) ,
859
- } ) ;
860
- manifests[ 0 ] . pieces [ 1 ] . notify . push ( DataActivationNotification {
861
- address : actor3,
862
- payload : RawBytes :: from ( vec ! [ 3 , 3 , 3 , 3 ] ) ,
863
- } ) ;
864
- manifests[ 0 ] . pieces [ 1 ] . notify . push ( DataActivationNotification {
865
- address : STORAGE_MARKET_ACTOR_ADDR ,
866
- payload : RawBytes :: from ( vec ! [ 4 , 4 , 4 , 4 ] ) ,
867
- } ) ;
868
-
869
- // Expect notifications to be sent to all actors
870
- rt. expect_send_simple (
871
- actor1,
872
- SECTOR_CONTENT_CHANGED ,
873
- None , // The actual params will be set by the notification system
874
- TokenAmount :: zero ( ) ,
875
- None , // Return value
876
- ExitCode :: OK ,
877
- ) ;
878
- rt. expect_send_simple (
879
- actor2,
880
- SECTOR_CONTENT_CHANGED ,
881
- None , // The actual params will be set by the notification system
882
- TokenAmount :: zero ( ) ,
883
- None , // Return value
884
- ExitCode :: OK ,
885
- ) ;
886
- rt. expect_send_simple (
887
- actor3,
888
- SECTOR_CONTENT_CHANGED ,
889
- None , // The actual params will be set by the notification system
890
- TokenAmount :: zero ( ) ,
891
- None , // Return value
892
- ExitCode :: OK ,
893
- ) ;
894
- rt. expect_send_simple (
895
- STORAGE_MARKET_ACTOR_ADDR ,
896
- SECTOR_CONTENT_CHANGED ,
897
- None , // The actual params will be set by the notification system
898
- TokenAmount :: zero ( ) ,
899
- None , // Return value
900
- ExitCode :: OK ,
901
- ) ;
902
-
903
- let cfg = ProveCommitSectors3Config :: default ( ) ;
904
- let ( result, _, _) =
905
- h. prove_commit_sectors3 ( & rt, & manifests, false , false , false , cfg) . unwrap ( ) ;
906
-
907
- assert_commit_result ( & [ ExitCode :: OK ] , & result) ;
908
- verify_weights ( & rt, & h, snos[ 0 ] , 0 , piece_size * 2 ) ;
909
- }
0 commit comments