@@ -299,7 +299,7 @@ fn close_works() {
299299 System :: set_block_number ( 3 ) ;
300300 assert_noop ! (
301301 Collective :: close(
302- RuntimeOrigin :: signed ( 4 ) ,
302+ RuntimeOrigin :: root ( ) ,
303303 hash,
304304 0 ,
305305 proposal_weight,
@@ -310,7 +310,7 @@ fn close_works() {
310310
311311 System :: set_block_number ( 4 ) ;
312312 assert_ok ! ( Collective :: close(
313- RuntimeOrigin :: signed ( 4 ) ,
313+ RuntimeOrigin :: root ( ) ,
314314 hash,
315315 0 ,
316316 proposal_weight,
@@ -370,7 +370,7 @@ fn proposal_weight_limit_works_on_approve() {
370370 System :: set_block_number ( 4 ) ;
371371 assert_noop ! (
372372 Collective :: close(
373- RuntimeOrigin :: signed ( 4 ) ,
373+ RuntimeOrigin :: root ( ) ,
374374 hash,
375375 0 ,
376376 proposal_weight - Weight :: from_parts( 100 , 0 ) ,
@@ -379,7 +379,7 @@ fn proposal_weight_limit_works_on_approve() {
379379 Error :: <Test , Instance1 >:: ProposalWeightLessThanDispatchCallWeight
380380 ) ;
381381 assert_ok ! ( Collective :: close(
382- RuntimeOrigin :: signed ( 4 ) ,
382+ RuntimeOrigin :: root ( ) ,
383383 hash,
384384 0 ,
385385 proposal_weight,
@@ -409,7 +409,7 @@ fn proposal_weight_limit_ignored_on_disapprove() {
409409 // No votes, this proposal wont pass
410410 System :: set_block_number ( 4 ) ;
411411 assert_ok ! ( Collective :: close(
412- RuntimeOrigin :: signed ( 4 ) ,
412+ RuntimeOrigin :: root ( ) ,
413413 hash,
414414 0 ,
415415 proposal_weight - Weight :: from_parts( 100 , 0 ) ,
@@ -442,7 +442,7 @@ fn close_with_prime_works() {
442442
443443 System :: set_block_number ( 4 ) ;
444444 assert_ok ! ( Collective :: close(
445- RuntimeOrigin :: signed ( 4 ) ,
445+ RuntimeOrigin :: root ( ) ,
446446 hash,
447447 0 ,
448448 proposal_weight,
@@ -502,7 +502,7 @@ fn close_with_voting_prime_works() {
502502
503503 System :: set_block_number ( 4 ) ;
504504 assert_ok ! ( Collective :: close(
505- RuntimeOrigin :: signed ( 4 ) ,
505+ RuntimeOrigin :: root ( ) ,
506506 hash,
507507 0 ,
508508 proposal_weight,
@@ -583,7 +583,7 @@ fn close_with_no_prime_but_majority_works() {
583583
584584 System :: set_block_number ( 4 ) ;
585585 assert_ok ! ( CollectiveMajority :: close(
586- RuntimeOrigin :: signed ( 4 ) ,
586+ RuntimeOrigin :: root ( ) ,
587587 hash,
588588 0 ,
589589 proposal_weight,
@@ -1109,7 +1109,7 @@ fn motions_all_first_vote_free_works() {
11091109
11101110 let proposal_weight = proposal. get_dispatch_info ( ) . weight ;
11111111 let close_rval: DispatchResultWithPostInfo = Collective :: close (
1112- RuntimeOrigin :: signed ( 2 ) ,
1112+ RuntimeOrigin :: root ( ) ,
11131113 hash,
11141114 0 ,
11151115 proposal_weight,
@@ -1120,7 +1120,7 @@ fn motions_all_first_vote_free_works() {
11201120 // Trying to close the proposal, which is already closed
11211121 // Error: "ProposalNotExists" with Pays::Yes.
11221122 let close_rval: DispatchResultWithPostInfo = Collective :: close (
1123- RuntimeOrigin :: signed ( 2 ) ,
1123+ RuntimeOrigin :: root ( ) ,
11241124 hash,
11251125 0 ,
11261126 proposal_weight,
@@ -1148,7 +1148,7 @@ fn motions_reproposing_disapproved_works() {
11481148 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , false ) ) ;
11491149
11501150 assert_ok ! ( Collective :: close(
1151- RuntimeOrigin :: signed ( 2 ) ,
1151+ RuntimeOrigin :: root ( ) ,
11521152 hash,
11531153 0 ,
11541154 proposal_weight,
@@ -1186,7 +1186,7 @@ fn motions_approval_with_enough_votes_and_lower_voting_threshold_works() {
11861186 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
11871187 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , true ) ) ;
11881188 assert_ok ! ( Collective :: close(
1189- RuntimeOrigin :: signed ( 2 ) ,
1189+ RuntimeOrigin :: root ( ) ,
11901190 hash,
11911191 0 ,
11921192 proposal_weight,
@@ -1243,7 +1243,7 @@ fn motions_approval_with_enough_votes_and_lower_voting_threshold_works() {
12431243 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 1 , true ) ) ;
12441244 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 3 ) , hash, 1 , true ) ) ;
12451245 assert_ok ! ( Collective :: close(
1246- RuntimeOrigin :: signed ( 2 ) ,
1246+ RuntimeOrigin :: root ( ) ,
12471247 hash,
12481248 1 ,
12491249 proposal_weight,
@@ -1315,7 +1315,7 @@ fn motions_disapproval_works() {
13151315 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , false ) ) ;
13161316 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , false ) ) ;
13171317 assert_ok ! ( Collective :: close(
1318- RuntimeOrigin :: signed ( 2 ) ,
1318+ RuntimeOrigin :: root ( ) ,
13191319 hash,
13201320 0 ,
13211321 proposal_weight,
@@ -1374,7 +1374,7 @@ fn motions_approval_works() {
13741374 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
13751375 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , true ) ) ;
13761376 assert_ok ! ( Collective :: close(
1377- RuntimeOrigin :: signed ( 2 ) ,
1377+ RuntimeOrigin :: root ( ) ,
13781378 hash,
13791379 0 ,
13801380 proposal_weight,
@@ -1448,7 +1448,7 @@ fn motion_with_no_votes_closes_with_disapproval() {
14481448 // an approving or disapproving simple majority due to the lack of votes.
14491449 assert_noop ! (
14501450 Collective :: close(
1451- RuntimeOrigin :: signed ( 2 ) ,
1451+ RuntimeOrigin :: root ( ) ,
14521452 hash,
14531453 0 ,
14541454 proposal_weight,
@@ -1462,7 +1462,7 @@ fn motion_with_no_votes_closes_with_disapproval() {
14621462 System :: set_block_number ( closing_block) ;
14631463 // we can successfully close the motion.
14641464 assert_ok ! ( Collective :: close(
1465- RuntimeOrigin :: signed ( 2 ) ,
1465+ RuntimeOrigin :: root ( ) ,
14661466 hash,
14671467 0 ,
14681468 proposal_weight,
@@ -1507,25 +1507,19 @@ fn close_disapprove_does_not_care_about_weight_or_len() {
15071507 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , true ) ) ;
15081508 // It will not close with bad weight/len information
15091509 assert_noop ! (
1510- Collective :: close( RuntimeOrigin :: signed ( 2 ) , hash, 0 , Weight :: zero( ) , 0 ) ,
1510+ Collective :: close( RuntimeOrigin :: root ( ) , hash, 0 , Weight :: zero( ) , 0 ) ,
15111511 Error :: <Test , Instance1 >:: ProposalLengthBoundLessThanProposalLength ,
15121512 ) ;
15131513 assert_noop ! (
1514- Collective :: close(
1515- RuntimeOrigin :: signed( 2 ) ,
1516- hash,
1517- 0 ,
1518- Weight :: zero( ) ,
1519- proposal_len
1520- ) ,
1514+ Collective :: close( RuntimeOrigin :: root( ) , hash, 0 , Weight :: zero( ) , proposal_len) ,
15211515 Error :: <Test , Instance1 >:: ProposalWeightLessThanDispatchCallWeight ,
15221516 ) ;
15231517 // Now we make the proposal fail
15241518 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , false ) ) ;
15251519 assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , false ) ) ;
15261520 // It can close even if the weight/len information is bad
15271521 assert_ok ! ( Collective :: close(
1528- RuntimeOrigin :: signed ( 2 ) ,
1522+ RuntimeOrigin :: root ( ) ,
15291523 hash,
15301524 0 ,
15311525 Weight :: zero( ) ,
0 commit comments