Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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