-
Notifications
You must be signed in to change notification settings - Fork 694
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
Move snow.DefaultConsensusContextTest
to snowtest.ConsensusContext
#2507
Conversation
snowtest
pkgsnow.DefaultConsensusContextTest()
to snowtest.EmptyConsensusContext()
snow.DefaultConsensusContextTest()
to snowtest.EmptyConsensusContext()
snow.DefaultConsensusContextTest
to snowtest.EmptyConsensusContext
snow/snowtest/snowtest.go
Outdated
return nil | ||
} | ||
|
||
func EmptyConsensusContext() *snow.ConsensusContext { |
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.
Since this is its own snowtest
package we could just call this snowtest.ConsensusContext
since it's now clear that this is a testing implementation
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.
Good point, re-named.
|
||
var _ snow.Acceptor = noOpAcceptor{} | ||
|
||
type noOpAcceptor struct{} |
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.
I don't think there's a reason to not export this
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.
I prefer to keep things unexported unless we plan on using it elsewhere but open to exporting if people feel differently
snow.DefaultConsensusContextTest
to snowtest.EmptyConsensusContext
snow.DefaultConsensusContextTest
to snowtest.ConsensusContext
Why this should be merged
Creates a
snowtest
pkg to contain all strictly testing-related structs. This segregates it from our production code.This PR is the first step moving
snow.DefaultConsensusContextTest()
tosnowtest.EmptyConsensusContext()
How this works
Creates the pkg and moves some testing-related things to it.
How this was tested
CI