-
Notifications
You must be signed in to change notification settings - Fork 279
sync: coreth PR #1394: ci: Missing test import lint #1869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JonathanOppenheimer
wants to merge
8
commits into
master
Choose a base branch
from
JonathanOppenheimer/sync-pr-1394-ci-lint-fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a693a15
ci: Missing test import lint (#1394)
alarso16 f7ad0df
Cey suggestion
JonathanOppenheimer 5d1b521
Merge branch 'master' into JonathanOppenheimer/sync-pr-1394-ci-lint-f…
JonathanOppenheimer 8752280
fix: use proper subnet chain ID
JonathanOppenheimer 0a2836c
Update plugin/evm/tx_gossip_test.go
JonathanOppenheimer 0dbe942
Merge branch 'master' into JonathanOppenheimer/sync-pr-1394-ci-lint-f…
JonathanOppenheimer 3bb75e7
fix: austin suggestion tabbing
JonathanOppenheimer ae1d79c
fix: revert Austin suggestion
JonathanOppenheimer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| // Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. | ||
| // See the file LICENSE for licensing terms. | ||
|
|
||
| package utilstest | ||
|
|
||
| import ( | ||
| "context" | ||
| "errors" | ||
|
|
||
| "github.com/ava-labs/avalanchego/ids" | ||
| "github.com/ava-labs/avalanchego/snow/snowtest" | ||
| "github.com/ava-labs/avalanchego/snow/validators" | ||
| "github.com/ava-labs/avalanchego/snow/validators/validatorstest" | ||
| "github.com/ava-labs/avalanchego/utils/constants" | ||
| ) | ||
|
|
||
| // SubnetEVMTestChainID is a subnet-evm specific chain ID for testing | ||
| var SubnetEVMTestChainID = ids.GenerateTestID() | ||
|
|
||
| // @TODO: This should eventually be replaced by a more robust solution, or alternatively, the presence of nil | ||
| // validator states shouldn't be depended upon by tests | ||
| func NewTestValidatorState() *validatorstest.State { | ||
| return &validatorstest.State{ | ||
| GetCurrentHeightF: func(context.Context) (uint64, error) { | ||
| return 0, nil | ||
| }, | ||
| GetSubnetIDF: func(_ context.Context, chainID ids.ID) (ids.ID, error) { | ||
| subnetID, ok := map[ids.ID]ids.ID{ | ||
| constants.PlatformChainID: constants.PrimaryNetworkID, | ||
| snowtest.XChainID: constants.PrimaryNetworkID, | ||
| snowtest.CChainID: constants.PrimaryNetworkID, | ||
| SubnetEVMTestChainID: constants.PrimaryNetworkID, | ||
| }[chainID] | ||
| if !ok { | ||
| return ids.Empty, errors.New("unknown chain") | ||
| } | ||
| return subnetID, nil | ||
| }, | ||
| GetValidatorSetF: func(context.Context, uint64, ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error) { | ||
| return map[ids.NodeID]*validators.GetValidatorOutput{}, nil | ||
| }, | ||
| GetWarpValidatorSetsF: func(context.Context, uint64) (map[ids.ID]validators.WarpSet, error) { | ||
| return nil, nil | ||
| }, | ||
| GetWarpValidatorSetF: func(context.Context, uint64, ids.ID) (validators.WarpSet, error) { | ||
| return validators.WarpSet{}, nil | ||
| }, | ||
| GetCurrentValidatorSetF: func(context.Context, ids.ID) (map[ids.ID]*validators.GetCurrentValidatorOutput, uint64, error) { | ||
| return map[ids.ID]*validators.GetCurrentValidatorOutput{}, 0, nil | ||
| }, | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to separately define this to set
GetValidatorSetFon line 96.