Documentation
¶
Overview ¶
Package verify is a generated GoMock package.
Index ¶
- Variables
- func All(verifiables ...Verifiable) error
- func SameNet(ctx context.Context, chainCtx *ChainContext, peerChainID ids.ID) error
- func SameSubnet(ctx context.Context, consensusCtx *consensusctx.Context, peerChainID ids.ID) error
- type ChainContext
- type ConsensusValidatorState
- type IsNotState
- type IsState
- type MockVerifiable
- type MockVerifiableMockRecorder
- type State
- type ValidatorState
- type Verifiable
Constants ¶
This section is empty.
Variables ¶
var ( ErrSameChainID = errors.New("same chainID") ErrMismatchedNetIDs = errors.New("mismatched netIDs") )
Functions ¶
func All ¶
func All(verifiables ...Verifiable) error
All returns nil if all the verifiables were verified with no errors
func SameNet ¶ added in v1.16.56
SameNet verifies that the provided [ctx] was provided to a chain in the same subnet as [peerChainID], but not the same chain. If this verification fails, a non-nil error will be returned.
func SameSubnet ¶ added in v0.1.1
SameSubnet verifies that the peerChainID is in the same subnet as the chain represented by consensusCtx, but not the same chain. This is a convenience wrapper for coreth compatibility that accepts *consensusctx.Context directly.
Types ¶
type ChainContext ¶ added in v1.16.56
type ChainContext struct {
ChainID ids.ID
NetID ids.ID
ValidatorState ValidatorState
}
ChainContext provides context for chain operations
type ConsensusValidatorState ¶ added in v1.16.56
ConsensusValidatorState wraps the consensus context ValidatorState interface
type IsNotState ¶ added in v0.1.1
type IsNotState interface {
// contains filtered or unexported methods
}
type IsState ¶ added in v0.1.1
type IsState interface {
// contains filtered or unexported methods
}
type MockVerifiable ¶ added in v1.1.11
type MockVerifiable struct {
// contains filtered or unexported fields
}
MockVerifiable is a mock of Verifiable interface.
func NewMockVerifiable ¶ added in v1.1.11
func NewMockVerifiable(ctrl *gomock.Controller) *MockVerifiable
NewMockVerifiable creates a new mock instance.
func (*MockVerifiable) EXPECT ¶ added in v1.1.11
func (m *MockVerifiable) EXPECT() *MockVerifiableMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockVerifiable) Verify ¶ added in v1.1.11
func (m *MockVerifiable) Verify() error
Verify mocks base method.
type MockVerifiableMockRecorder ¶ added in v1.1.11
type MockVerifiableMockRecorder struct {
// contains filtered or unexported fields
}
MockVerifiableMockRecorder is the mock recorder for MockVerifiable.
func (*MockVerifiableMockRecorder) Verify ¶ added in v1.1.11
func (mr *MockVerifiableMockRecorder) Verify() *gomock.Call
Verify indicates an expected call of Verify.
type State ¶ added in v0.1.1
type State interface {
Verifiable
IsState
}
type ValidatorState ¶ added in v1.16.56
ValidatorState provides validator state lookups
type Verifiable ¶
type Verifiable interface {
Verify() error
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package verifymock is a generated GoMock package.
|
Package verifymock is a generated GoMock package. |