@@ -299,7 +299,7 @@ fn close_works() {
299
299
System :: set_block_number ( 3 ) ;
300
300
assert_noop ! (
301
301
Collective :: close(
302
- RuntimeOrigin :: signed ( 4 ) ,
302
+ RuntimeOrigin :: root ( ) ,
303
303
hash,
304
304
0 ,
305
305
proposal_weight,
@@ -310,7 +310,7 @@ fn close_works() {
310
310
311
311
System :: set_block_number ( 4 ) ;
312
312
assert_ok ! ( Collective :: close(
313
- RuntimeOrigin :: signed ( 4 ) ,
313
+ RuntimeOrigin :: root ( ) ,
314
314
hash,
315
315
0 ,
316
316
proposal_weight,
@@ -370,7 +370,7 @@ fn proposal_weight_limit_works_on_approve() {
370
370
System :: set_block_number ( 4 ) ;
371
371
assert_noop ! (
372
372
Collective :: close(
373
- RuntimeOrigin :: signed ( 4 ) ,
373
+ RuntimeOrigin :: root ( ) ,
374
374
hash,
375
375
0 ,
376
376
proposal_weight - Weight :: from_parts( 100 , 0 ) ,
@@ -379,7 +379,7 @@ fn proposal_weight_limit_works_on_approve() {
379
379
Error :: <Test , Instance1 >:: ProposalWeightLessThanDispatchCallWeight
380
380
) ;
381
381
assert_ok ! ( Collective :: close(
382
- RuntimeOrigin :: signed ( 4 ) ,
382
+ RuntimeOrigin :: root ( ) ,
383
383
hash,
384
384
0 ,
385
385
proposal_weight,
@@ -409,7 +409,7 @@ fn proposal_weight_limit_ignored_on_disapprove() {
409
409
// No votes, this proposal wont pass
410
410
System :: set_block_number ( 4 ) ;
411
411
assert_ok ! ( Collective :: close(
412
- RuntimeOrigin :: signed ( 4 ) ,
412
+ RuntimeOrigin :: root ( ) ,
413
413
hash,
414
414
0 ,
415
415
proposal_weight - Weight :: from_parts( 100 , 0 ) ,
@@ -442,7 +442,7 @@ fn close_with_prime_works() {
442
442
443
443
System :: set_block_number ( 4 ) ;
444
444
assert_ok ! ( Collective :: close(
445
- RuntimeOrigin :: signed ( 4 ) ,
445
+ RuntimeOrigin :: root ( ) ,
446
446
hash,
447
447
0 ,
448
448
proposal_weight,
@@ -502,7 +502,7 @@ fn close_with_voting_prime_works() {
502
502
503
503
System :: set_block_number ( 4 ) ;
504
504
assert_ok ! ( Collective :: close(
505
- RuntimeOrigin :: signed ( 4 ) ,
505
+ RuntimeOrigin :: root ( ) ,
506
506
hash,
507
507
0 ,
508
508
proposal_weight,
@@ -583,7 +583,7 @@ fn close_with_no_prime_but_majority_works() {
583
583
584
584
System :: set_block_number ( 4 ) ;
585
585
assert_ok ! ( CollectiveMajority :: close(
586
- RuntimeOrigin :: signed ( 4 ) ,
586
+ RuntimeOrigin :: root ( ) ,
587
587
hash,
588
588
0 ,
589
589
proposal_weight,
@@ -1109,7 +1109,7 @@ fn motions_all_first_vote_free_works() {
1109
1109
1110
1110
let proposal_weight = proposal. get_dispatch_info ( ) . weight ;
1111
1111
let close_rval: DispatchResultWithPostInfo = Collective :: close (
1112
- RuntimeOrigin :: signed ( 2 ) ,
1112
+ RuntimeOrigin :: root ( ) ,
1113
1113
hash,
1114
1114
0 ,
1115
1115
proposal_weight,
@@ -1120,7 +1120,7 @@ fn motions_all_first_vote_free_works() {
1120
1120
// Trying to close the proposal, which is already closed
1121
1121
// Error: "ProposalNotExists" with Pays::Yes.
1122
1122
let close_rval: DispatchResultWithPostInfo = Collective :: close (
1123
- RuntimeOrigin :: signed ( 2 ) ,
1123
+ RuntimeOrigin :: root ( ) ,
1124
1124
hash,
1125
1125
0 ,
1126
1126
proposal_weight,
@@ -1148,7 +1148,7 @@ fn motions_reproposing_disapproved_works() {
1148
1148
assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , false ) ) ;
1149
1149
1150
1150
assert_ok ! ( Collective :: close(
1151
- RuntimeOrigin :: signed ( 2 ) ,
1151
+ RuntimeOrigin :: root ( ) ,
1152
1152
hash,
1153
1153
0 ,
1154
1154
proposal_weight,
@@ -1186,7 +1186,7 @@ fn motions_approval_with_enough_votes_and_lower_voting_threshold_works() {
1186
1186
assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
1187
1187
assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , true ) ) ;
1188
1188
assert_ok ! ( Collective :: close(
1189
- RuntimeOrigin :: signed ( 2 ) ,
1189
+ RuntimeOrigin :: root ( ) ,
1190
1190
hash,
1191
1191
0 ,
1192
1192
proposal_weight,
@@ -1243,7 +1243,7 @@ fn motions_approval_with_enough_votes_and_lower_voting_threshold_works() {
1243
1243
assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 1 , true ) ) ;
1244
1244
assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 3 ) , hash, 1 , true ) ) ;
1245
1245
assert_ok ! ( Collective :: close(
1246
- RuntimeOrigin :: signed ( 2 ) ,
1246
+ RuntimeOrigin :: root ( ) ,
1247
1247
hash,
1248
1248
1 ,
1249
1249
proposal_weight,
@@ -1315,7 +1315,7 @@ fn motions_disapproval_works() {
1315
1315
assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , false ) ) ;
1316
1316
assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , false ) ) ;
1317
1317
assert_ok ! ( Collective :: close(
1318
- RuntimeOrigin :: signed ( 2 ) ,
1318
+ RuntimeOrigin :: root ( ) ,
1319
1319
hash,
1320
1320
0 ,
1321
1321
proposal_weight,
@@ -1374,7 +1374,7 @@ fn motions_approval_works() {
1374
1374
assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , true ) ) ;
1375
1375
assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , true ) ) ;
1376
1376
assert_ok ! ( Collective :: close(
1377
- RuntimeOrigin :: signed ( 2 ) ,
1377
+ RuntimeOrigin :: root ( ) ,
1378
1378
hash,
1379
1379
0 ,
1380
1380
proposal_weight,
@@ -1448,7 +1448,7 @@ fn motion_with_no_votes_closes_with_disapproval() {
1448
1448
// an approving or disapproving simple majority due to the lack of votes.
1449
1449
assert_noop ! (
1450
1450
Collective :: close(
1451
- RuntimeOrigin :: signed ( 2 ) ,
1451
+ RuntimeOrigin :: root ( ) ,
1452
1452
hash,
1453
1453
0 ,
1454
1454
proposal_weight,
@@ -1462,7 +1462,7 @@ fn motion_with_no_votes_closes_with_disapproval() {
1462
1462
System :: set_block_number ( closing_block) ;
1463
1463
// we can successfully close the motion.
1464
1464
assert_ok ! ( Collective :: close(
1465
- RuntimeOrigin :: signed ( 2 ) ,
1465
+ RuntimeOrigin :: root ( ) ,
1466
1466
hash,
1467
1467
0 ,
1468
1468
proposal_weight,
@@ -1507,25 +1507,19 @@ fn close_disapprove_does_not_care_about_weight_or_len() {
1507
1507
assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , true ) ) ;
1508
1508
// It will not close with bad weight/len information
1509
1509
assert_noop ! (
1510
- Collective :: close( RuntimeOrigin :: signed ( 2 ) , hash, 0 , Weight :: zero( ) , 0 ) ,
1510
+ Collective :: close( RuntimeOrigin :: root ( ) , hash, 0 , Weight :: zero( ) , 0 ) ,
1511
1511
Error :: <Test , Instance1 >:: ProposalLengthBoundLessThanProposalLength ,
1512
1512
) ;
1513
1513
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) ,
1521
1515
Error :: <Test , Instance1 >:: ProposalWeightLessThanDispatchCallWeight ,
1522
1516
) ;
1523
1517
// Now we make the proposal fail
1524
1518
assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 1 ) , hash, 0 , false ) ) ;
1525
1519
assert_ok ! ( Collective :: vote( RuntimeOrigin :: signed( 2 ) , hash, 0 , false ) ) ;
1526
1520
// It can close even if the weight/len information is bad
1527
1521
assert_ok ! ( Collective :: close(
1528
- RuntimeOrigin :: signed ( 2 ) ,
1522
+ RuntimeOrigin :: root ( ) ,
1529
1523
hash,
1530
1524
0 ,
1531
1525
Weight :: zero( ) ,
0 commit comments