Skip to content

Commit

Permalink
Fix Update global params tests (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
lazynina authored Apr 1, 2024
1 parent 1c65e5f commit 993b149
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions routes/admin_transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,20 @@ func TestUpdateGlobalParams(t *testing.T) {
// Update all GlobalParam fields.
updateGlobalParams(&UpdateGlobalParamsRequest{
UpdaterPublicKeyBase58Check: senderPkString,
MinimumNetworkFeeNanosPerKB: 99,
MinimumNetworkFeeNanosPerKB: 1000,
StakeLockupEpochDuration: 4,
ValidatorJailEpochDuration: 4,
LeaderScheduleMaxNumValidators: 101,
ValidatorSetMaxNumValidators: 102,
EpochDurationNumBlocks: 3601,
JailInactiveValidatorGracePeriodEpochs: 49,
MinFeeRateNanosPerKB: 99,
MinFeeRateNanosPerKB: 1000,
})
}
{
// Verify all updated GlobalParam fields.
globalParams := getGlobalParams()
require.Equal(t, globalParams.MinimumNetworkFeeNanosPerKB, uint64(99))
require.Equal(t, globalParams.MinimumNetworkFeeNanosPerKB, uint64(1000))
require.Equal(t, globalParams.StakeLockupEpochDuration, uint64(4))
require.Equal(t, globalParams.ValidatorJailEpochDuration, uint64(4))
require.Equal(t, globalParams.LeaderScheduleMaxNumValidators, uint64(101))
Expand All @@ -122,15 +122,15 @@ func TestUpdateGlobalParams(t *testing.T) {
// Update only one GlobalParam field.
updateGlobalParams(&UpdateGlobalParamsRequest{
UpdaterPublicKeyBase58Check: senderPkString,
MinimumNetworkFeeNanosPerKB: 99,
MinimumNetworkFeeNanosPerKB: 1000,
JailInactiveValidatorGracePeriodEpochs: 50,
MinFeeRateNanosPerKB: 99,
MinFeeRateNanosPerKB: 1000,
})
}
{
// Verify updated GlobalParam field. And other fields retain old values.
globalParams := getGlobalParams()
require.Equal(t, globalParams.MinimumNetworkFeeNanosPerKB, uint64(99))
require.Equal(t, globalParams.MinimumNetworkFeeNanosPerKB, uint64(1000))
require.Equal(t, globalParams.StakeLockupEpochDuration, uint64(4))
require.Equal(t, globalParams.ValidatorJailEpochDuration, uint64(4))
require.Equal(t, globalParams.LeaderScheduleMaxNumValidators, uint64(101))
Expand Down

0 comments on commit 993b149

Please sign in to comment.