@@ -40,7 +40,7 @@ fn set_governance_cooldown_succeeds_within_bounds() {
4040 let ( _env, client, _admin) = setup ( ) ;
4141 // 100 ledgers is well within the 30-day maximum.
4242 assert ! ( client
43- . try_admin_set_governance_cooldown_ledgers ( & 100u32 )
43+ . try_admin_set_gov_cooldown_ledgers ( & 100u32 )
4444 . is_ok( ) ) ;
4545 assert_eq ! ( client. get_governance_cooldown_ledgers( ) , 100 ) ;
4646}
@@ -51,15 +51,15 @@ fn set_governance_cooldown_out_of_bounds_fails() {
5151 // 30 days is niffyinsure::admin::MAX_GOVERNANCE_COOLDOWN_LEDGERS.
5252 // Exceed it: 30 * 17_280 + 1
5353 let too_large = 30u32 * 17_280u32 + 1 ;
54- let result = client. try_admin_set_governance_cooldown_ledgers ( & too_large) ;
54+ let result = client. try_admin_set_gov_cooldown_ledgers ( & too_large) ;
5555 assert ! ( result. is_err( ) ) ;
5656}
5757
5858#[ test]
5959fn config_change_within_cooldown_reverts ( ) {
6060 let ( env, client, _admin) = setup ( ) ;
6161 // Set a 1_000-ledger cooldown, then immediately try to change quorum.
62- client. admin_set_governance_cooldown_ledgers ( & 1_000u32 ) ;
62+ client. admin_set_gov_cooldown_ledgers ( & 1_000u32 ) ;
6363
6464 // Immediately try another change – must be blocked.
6565 let result = client. try_admin_set_quorum_bps ( & 500u32 ) ;
@@ -73,7 +73,7 @@ fn config_change_within_cooldown_reverts() {
7373fn config_change_after_cooldown_succeeds ( ) {
7474 let ( env, client, _admin) = setup ( ) ;
7575 let cooldown = 500u32 ;
76- client. admin_set_governance_cooldown_ledgers ( & cooldown) ;
76+ client. admin_set_gov_cooldown_ledgers ( & cooldown) ;
7777
7878 // Advance past the cooldown.
7979 env. ledger ( ) . with_mut ( |l| {
@@ -88,7 +88,7 @@ fn config_change_after_cooldown_succeeds() {
8888fn cooldown_enforced_on_vote_duration_change ( ) {
8989 let ( env, client, _admin) = setup ( ) ;
9090 let cooldown = 200u32 ;
91- client. admin_set_governance_cooldown_ledgers ( & cooldown) ;
91+ client. admin_set_gov_cooldown_ledgers ( & cooldown) ;
9292
9393 // Within cooldown: should fail.
9494 assert ! (
@@ -112,7 +112,7 @@ fn cooldown_enforced_on_vote_duration_change() {
112112fn cooldown_enforced_on_rolling_claim_cap_change ( ) {
113113 let ( env, client, _admin) = setup ( ) ;
114114 let cooldown = 300u32 ;
115- client. admin_set_governance_cooldown_ledgers ( & cooldown) ;
115+ client. admin_set_gov_cooldown_ledgers ( & cooldown) ;
116116
117117 // Within cooldown: should fail.
118118 assert ! ( client. try_set_rolling_claim_cap( & 500_000i128 ) . is_err( ) ) ;
@@ -128,7 +128,7 @@ fn cooldown_enforced_on_rolling_claim_cap_change() {
128128fn cooldown_enforced_on_grace_period_change ( ) {
129129 let ( env, client, _admin) = setup ( ) ;
130130 let cooldown = 400u32 ;
131- client. admin_set_governance_cooldown_ledgers ( & cooldown) ;
131+ client. admin_set_gov_cooldown_ledgers ( & cooldown) ;
132132
133133 // Within cooldown: should fail.
134134 let grace = types:: MIN_GRACE_PERIOD_LEDGERS ;
@@ -145,15 +145,15 @@ fn cooldown_enforced_on_grace_period_change() {
145145fn cooldown_set_to_zero_disables_enforcement ( ) {
146146 let ( env, client, _admin) = setup ( ) ;
147147 // First enable, then immediately disable.
148- client. admin_set_governance_cooldown_ledgers ( & 500u32 ) ;
148+ client. admin_set_gov_cooldown_ledgers ( & 500u32 ) ;
149149
150150 // Advance past cooldown to allow next change.
151151 env. ledger ( ) . with_mut ( |l| {
152152 l. sequence_number = l. sequence_number . saturating_add ( 501 ) ;
153153 } ) ;
154154
155155 // Disable cooldown.
156- client. admin_set_governance_cooldown_ledgers ( & 0u32 ) ;
156+ client. admin_set_gov_cooldown_ledgers ( & 0u32 ) ;
157157
158158 // Now rapid changes must succeed.
159159 assert ! ( client. try_admin_set_quorum_bps( & 1_000u32 ) . is_ok( ) ) ;
0 commit comments