Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
abi87 committed Feb 18, 2024
1 parent a4746ce commit 4b0e2c7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
13 changes: 1 addition & 12 deletions vms/platformvm/block/executor/proposal_block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/ava-labs/avalanchego/utils/constants"
"github.com/ava-labs/avalanchego/utils/crypto/bls"
"github.com/ava-labs/avalanchego/utils/crypto/secp256k1"
"github.com/ava-labs/avalanchego/utils/timer/mockable"
"github.com/ava-labs/avalanchego/vms/components/avax"
"github.com/ava-labs/avalanchego/vms/platformvm/block"
"github.com/ava-labs/avalanchego/vms/platformvm/reward"
Expand Down Expand Up @@ -139,9 +138,6 @@ func TestBanffProposalBlockTimeVerification(t *testing.T) {
ctrl := gomock.NewController(t)

env := newEnvironment(t, ctrl, banffFork)
env.clk.Set(defaultGenesisTime)
env.config.BanffTime = time.Time{} // activate Banff
env.config.DurangoTime = mockable.MaxTime // deactivate Durango

// create parentBlock. It's a standard one for simplicity
parentTime := defaultGenesisTime
Expand Down Expand Up @@ -550,7 +546,6 @@ func TestBanffProposalBlockUpdateStakers(t *testing.T) {
t.Run(test.description, func(t *testing.T) {
require := require.New(t)
env := newEnvironment(t, nil, banffFork)
env.config.BanffTime = time.Time{} // activate Banff

subnetID := testSubnet1.ID()
env.config.TrackedSubnets.Add(subnetID)
Expand Down Expand Up @@ -703,7 +698,6 @@ func TestBanffProposalBlockUpdateStakers(t *testing.T) {
func TestBanffProposalBlockRemoveSubnetValidator(t *testing.T) {
require := require.New(t)
env := newEnvironment(t, nil, banffFork)
env.config.BanffTime = time.Time{} // activate Banff

subnetID := testSubnet1.ID()
env.config.TrackedSubnets.Add(subnetID)
Expand Down Expand Up @@ -846,7 +840,6 @@ func TestBanffProposalBlockTrackedSubnet(t *testing.T) {
t.Run(fmt.Sprintf("tracked %t", tracked), func(t *testing.T) {
require := require.New(t)
env := newEnvironment(t, nil, banffFork)
env.config.BanffTime = time.Time{} // activate Banff

subnetID := testSubnet1.ID()
if tracked {
Expand Down Expand Up @@ -951,7 +944,6 @@ func TestBanffProposalBlockTrackedSubnet(t *testing.T) {
func TestBanffProposalBlockDelegatorStakerWeight(t *testing.T) {
require := require.New(t)
env := newEnvironment(t, nil, banffFork)
env.config.BanffTime = time.Time{} // activate Banff

// Case: Timestamp is after next validator start time
// Add a pending validator
Expand Down Expand Up @@ -1136,7 +1128,6 @@ func TestBanffProposalBlockDelegatorStakerWeight(t *testing.T) {
func TestBanffProposalBlockDelegatorStakers(t *testing.T) {
require := require.New(t)
env := newEnvironment(t, nil, banffFork)
env.config.BanffTime = time.Time{} // activate Banff

// Case: Timestamp is after next validator start time
// Add a pending validator
Expand Down Expand Up @@ -1320,9 +1311,7 @@ func TestBanffProposalBlockDelegatorStakers(t *testing.T) {

func TestAddValidatorProposalBlock(t *testing.T) {
require := require.New(t)
env := newEnvironment(t, nil, apricotPhase5)
env.config.BanffTime = time.Time{} // activate Banff
env.config.DurangoTime = time.Time{} // activate Durango
env := newEnvironment(t, nil, durangoFork)

now := env.clk.Time()

Expand Down
6 changes: 0 additions & 6 deletions vms/platformvm/block/executor/standard_block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ func TestBanffStandardBlockTimeVerification(t *testing.T) {
env := newEnvironment(t, ctrl, banffFork)
now := env.clk.Time()
env.clk.Set(now)
env.config.BanffTime = time.Time{} // activate Banff

// setup and store parent block
// it's a standard block for simplicity
Expand Down Expand Up @@ -291,7 +290,6 @@ func TestBanffStandardBlockUpdatePrimaryNetworkStakers(t *testing.T) {
require := require.New(t)

env := newEnvironment(t, nil, banffFork)
env.config.BanffTime = time.Time{} // activate Banff

// Case: Timestamp is after next validator start time
// Add a pending validator
Expand Down Expand Up @@ -493,7 +491,6 @@ func TestBanffStandardBlockUpdateStakers(t *testing.T) {
t.Run(test.description, func(t *testing.T) {
require := require.New(t)
env := newEnvironment(t, nil, banffFork)
env.config.BanffTime = time.Time{} // activate Banff

subnetID := testSubnet1.ID()
env.config.TrackedSubnets.Add(subnetID)
Expand Down Expand Up @@ -593,7 +590,6 @@ func TestBanffStandardBlockUpdateStakers(t *testing.T) {
func TestBanffStandardBlockRemoveSubnetValidator(t *testing.T) {
require := require.New(t)
env := newEnvironment(t, nil, banffFork)
env.config.BanffTime = time.Time{} // activate Banff

subnetID := testSubnet1.ID()
env.config.TrackedSubnets.Add(subnetID)
Expand Down Expand Up @@ -691,7 +687,6 @@ func TestBanffStandardBlockTrackedSubnet(t *testing.T) {
t.Run(fmt.Sprintf("tracked %t", tracked), func(t *testing.T) {
require := require.New(t)
env := newEnvironment(t, nil, banffFork)
env.config.BanffTime = time.Time{} // activate Banff

subnetID := testSubnet1.ID()
if tracked {
Expand Down Expand Up @@ -752,7 +747,6 @@ func TestBanffStandardBlockTrackedSubnet(t *testing.T) {
func TestBanffStandardBlockDelegatorStakerWeight(t *testing.T) {
require := require.New(t)
env := newEnvironment(t, nil, banffFork)
env.config.BanffTime = time.Time{} // activate Banff

// Case: Timestamp is after next validator start time
// Add a pending validator
Expand Down

0 comments on commit 4b0e2c7

Please sign in to comment.