@@ -292,9 +292,7 @@ fn close_works() {
292292 RuntimeOrigin :: signed( 1 ) ,
293293 Box :: new( proposal. clone( ) ) ,
294294 proposal_len,
295- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
296- . ok( )
297- . expect( "convert u64 to block number." )
295+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
298296 ) ) ;
299297 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
300298
@@ -365,9 +363,7 @@ fn proposal_weight_limit_works_on_approve() {
365363 RuntimeOrigin :: signed( 1 ) ,
366364 Box :: new( proposal. clone( ) ) ,
367365 proposal_len,
368- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
369- . ok( )
370- . expect( "convert u64 to block number." )
366+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
371367 ) ) ;
372368 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
373369 // With 1's prime vote, this should pass
@@ -408,9 +404,7 @@ fn proposal_weight_limit_ignored_on_disapprove() {
408404 RuntimeOrigin :: signed( 1 ) ,
409405 Box :: new( proposal. clone( ) ) ,
410406 proposal_len,
411- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
412- . ok( )
413- . expect( "convert u64 to block number." )
407+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
414408 ) ) ;
415409 // No votes, this proposal wont pass
416410 System :: set_block_number ( 4 ) ;
@@ -442,9 +436,7 @@ fn close_with_prime_works() {
442436 RuntimeOrigin :: signed( 1 ) ,
443437 Box :: new( proposal. clone( ) ) ,
444438 proposal_len,
445- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
446- . ok( )
447- . expect( "convert u64 to block number." )
439+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
448440 ) ) ;
449441 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
450442
@@ -504,9 +496,7 @@ fn close_with_voting_prime_works() {
504496 RuntimeOrigin :: signed( 1 ) ,
505497 Box :: new( proposal. clone( ) ) ,
506498 proposal_len,
507- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
508- . ok( )
509- . expect( "convert u64 to block number." )
499+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
510500 ) ) ;
511501 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
512502
@@ -570,9 +560,7 @@ fn close_with_no_prime_but_majority_works() {
570560 RuntimeOrigin :: signed( 1 ) ,
571561 Box :: new( proposal. clone( ) ) ,
572562 proposal_len,
573- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
574- . ok( )
575- . expect( "convert u64 to block number." )
563+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
576564 ) ) ;
577565 assert_ok ! ( CollectiveMajority :: vote(
578566 RuntimeOrigin :: signed( 1 ) ,
@@ -666,9 +654,7 @@ fn removal_of_old_voters_votes_works() {
666654 RuntimeOrigin :: signed( 1 ) ,
667655 Box :: new( proposal. clone( ) ) ,
668656 proposal_len,
669- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
670- . ok( )
671- . expect( "convert u64 to block number." )
657+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
672658 ) ) ;
673659 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
674660 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , true ) ) ;
@@ -701,9 +687,7 @@ fn removal_of_old_voters_votes_works() {
701687 RuntimeOrigin :: signed( 2 ) ,
702688 Box :: new( proposal. clone( ) ) ,
703689 proposal_len,
704- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
705- . ok( )
706- . expect( "convert u64 to block number." )
690+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
707691 ) ) ;
708692 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 1 , true ) ) ;
709693 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 3 ) , hash, 1 , false ) ) ;
@@ -742,9 +726,7 @@ fn removal_of_old_voters_votes_works_with_set_members() {
742726 RuntimeOrigin :: signed( 1 ) ,
743727 Box :: new( proposal. clone( ) ) ,
744728 proposal_len,
745- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
746- . ok( )
747- . expect( "convert u64 to block number." )
729+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
748730 ) ) ;
749731 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
750732 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , true ) ) ;
@@ -782,9 +764,7 @@ fn removal_of_old_voters_votes_works_with_set_members() {
782764 RuntimeOrigin :: signed( 2 ) ,
783765 Box :: new( proposal. clone( ) ) ,
784766 proposal_len,
785- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
786- . ok( )
787- . expect( "convert u64 to block number." )
767+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
788768 ) ) ;
789769 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 1 , true ) ) ;
790770 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 3 ) , hash, 1 , false ) ) ;
@@ -828,9 +808,7 @@ fn propose_works() {
828808 RuntimeOrigin :: signed( 1 ) ,
829809 Box :: new( proposal. clone( ) ) ,
830810 proposal_len,
831- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
832- . ok( )
833- . expect( "convert u64 to block number." )
811+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
834812 ) ) ;
835813 assert_eq ! ( * Collective :: proposals( ) , vec![ hash] ) ;
836814 assert_eq ! ( Collective :: proposal_of( hash) , Some ( proposal) ) ;
@@ -870,7 +848,6 @@ fn limit_active_proposals() {
870848 Box :: new( proposal. clone( ) ) ,
871849 proposal_len,
872850 TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
873- . ok( )
874851 . expect( "convert u64 to block number." )
875852 ) ) ;
876853 }
@@ -882,7 +859,6 @@ fn limit_active_proposals() {
882859 Box :: new( proposal. clone( ) ) ,
883860 proposal_len,
884861 TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
885- . ok( )
886862 . expect( "convert u64 to block number." )
887863 ) ,
888864 Error :: <Test , Instance1 >:: TooManyProposals
@@ -903,9 +879,7 @@ fn correct_validate_and_get_proposal() {
903879 RuntimeOrigin :: signed( 1 ) ,
904880 Box :: new( proposal. clone( ) ) ,
905881 length,
906- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
907- . ok( )
908- . expect( "convert u64 to block number." )
882+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
909883 ) ) ;
910884
911885 let hash = BlakeTwo256 :: hash_of ( & proposal) ;
@@ -949,7 +923,6 @@ fn motions_ignoring_non_collective_proposals_works() {
949923 Box :: new( proposal. clone( ) ) ,
950924 proposal_len,
951925 TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
952- . ok( )
953926 . expect( "convert u64 to block number." )
954927 ) ,
955928 Error :: <Test , Instance1 >:: NotMember
@@ -967,9 +940,7 @@ fn motions_ignoring_non_collective_votes_works() {
967940 RuntimeOrigin :: signed( 1 ) ,
968941 Box :: new( proposal. clone( ) ) ,
969942 proposal_len,
970- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
971- . ok( )
972- . expect( "convert u64 to block number." )
943+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
973944 ) ) ;
974945 assert_noop ! (
975946 Collective :: vote( RuntimeOrigin :: signed( 42 ) , hash, 0 , true ) ,
@@ -989,9 +960,7 @@ fn motions_ignoring_bad_index_collective_vote_works() {
989960 RuntimeOrigin :: signed( 1 ) ,
990961 Box :: new( proposal. clone( ) ) ,
991962 proposal_len,
992- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
993- . ok( )
994- . expect( "convert u64 to block number." )
963+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
995964 ) ) ;
996965 assert_noop ! (
997966 Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 1 , true ) ,
@@ -1011,9 +980,7 @@ fn motions_vote_after_works() {
1011980 RuntimeOrigin :: signed( 1 ) ,
1012981 Box :: new( proposal. clone( ) ) ,
1013982 proposal_len,
1014- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
1015- . ok( )
1016- . expect( "convert u64 to block number." )
983+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
1017984 ) ) ;
1018985 // Initially there a no votes when the motion is proposed.
1019986 assert_eq ! (
@@ -1100,9 +1067,7 @@ fn motions_all_first_vote_free_works() {
11001067 RuntimeOrigin :: signed( 1 ) ,
11011068 Box :: new( proposal. clone( ) ) ,
11021069 proposal_len,
1103- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
1104- . ok( )
1105- . expect( "convert u64 to block number." )
1070+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
11061071 ) ) ;
11071072 assert_eq ! (
11081073 Collective :: voting( hash) ,
@@ -1176,9 +1141,7 @@ fn motions_reproposing_disapproved_works() {
11761141 RuntimeOrigin :: signed( 1 ) ,
11771142 Box :: new( proposal. clone( ) ) ,
11781143 proposal_len,
1179- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
1180- . ok( )
1181- . expect( "convert u64 to block number." )
1144+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
11821145 ) ) ;
11831146
11841147 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , false ) ) ;
@@ -1196,9 +1159,7 @@ fn motions_reproposing_disapproved_works() {
11961159 RuntimeOrigin :: signed( 1 ) ,
11971160 Box :: new( proposal. clone( ) ) ,
11981161 proposal_len,
1199- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
1200- . ok( )
1201- . expect( "convert u64 to block number." )
1162+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
12021163 ) ) ;
12031164 assert_eq ! ( * Collective :: proposals( ) , vec![ hash] ) ;
12041165 } ) ;
@@ -1220,9 +1181,7 @@ fn motions_approval_with_enough_votes_and_lower_voting_threshold_works() {
12201181 RuntimeOrigin :: signed( 1 ) ,
12211182 Box :: new( proposal. clone( ) ) ,
12221183 proposal_len,
1223- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
1224- . ok( )
1225- . expect( "convert u64 to block number." )
1184+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
12261185 ) ) ;
12271186 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
12281187 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , true ) ) ;
@@ -1278,9 +1237,7 @@ fn motions_approval_with_enough_votes_and_lower_voting_threshold_works() {
12781237 RuntimeOrigin :: signed( 1 ) ,
12791238 Box :: new( proposal. clone( ) ) ,
12801239 proposal_len,
1281- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
1282- . ok( )
1283- . expect( "convert u64 to block number." )
1240+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
12841241 ) ) ;
12851242 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 1 , true ) ) ;
12861243 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 1 , true ) ) ;
@@ -1353,9 +1310,7 @@ fn motions_disapproval_works() {
13531310 RuntimeOrigin :: signed( 1 ) ,
13541311 Box :: new( proposal. clone( ) ) ,
13551312 proposal_len,
1356- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
1357- . ok( )
1358- . expect( "convert u64 to block number." )
1313+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
13591314 ) ) ;
13601315 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , false ) ) ;
13611316 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , false ) ) ;
@@ -1414,9 +1369,7 @@ fn motions_approval_works() {
14141369 RuntimeOrigin :: signed( 1 ) ,
14151370 Box :: new( proposal. clone( ) ) ,
14161371 proposal_len,
1417- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
1418- . ok( )
1419- . expect( "convert u64 to block number." )
1372+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
14201373 ) ) ;
14211374 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
14221375 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , true ) ) ;
@@ -1479,9 +1432,7 @@ fn motion_with_no_votes_closes_with_disapproval() {
14791432 RuntimeOrigin :: signed( 1 ) ,
14801433 Box :: new( proposal. clone( ) ) ,
14811434 proposal_len,
1482- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
1483- . ok( )
1484- . expect( "convert u64 to block number." )
1435+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
14851436 ) ) ;
14861437 assert_eq ! (
14871438 System :: events( ) [ 0 ] ,
@@ -1549,9 +1500,7 @@ fn close_disapprove_does_not_care_about_weight_or_len() {
15491500 RuntimeOrigin :: signed( 1 ) ,
15501501 Box :: new( proposal. clone( ) ) ,
15511502 proposal_len,
1552- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
1553- . ok( )
1554- . expect( "convert u64 to block number." )
1503+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
15551504 ) ) ;
15561505 // First we make the proposal succeed
15571506 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
@@ -1595,9 +1544,7 @@ fn disapprove_proposal_works() {
15951544 RuntimeOrigin :: signed( 1 ) ,
15961545 Box :: new( proposal. clone( ) ) ,
15971546 proposal_len,
1598- TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 )
1599- . ok( )
1600- . expect( "convert u64 to block number." )
1547+ TryInto :: <BlockNumberFor <Test >>:: try_into( 3u64 ) . expect( "convert u64 to block number." )
16011548 ) ) ;
16021549 // Proposal would normally succeed
16031550 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
0 commit comments