mirror of
https://github.com/tendermint/tendermint.git
synced 2025-12-23 14:25:19 +00:00
This PR removes lite & renames lite2 to light throughout the repo Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> Closes: #4944
35 lines
782 B
Go
35 lines
782 B
Go
package mock
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/tendermint/tendermint/light/provider"
|
|
"github.com/tendermint/tendermint/types"
|
|
)
|
|
|
|
var errNoResp = errors.New("no response from provider")
|
|
|
|
type deadMock struct {
|
|
chainID string
|
|
}
|
|
|
|
// NewDeadMock creates a mock provider that always errors.
|
|
func NewDeadMock(chainID string) provider.Provider {
|
|
return &deadMock{chainID: chainID}
|
|
}
|
|
|
|
func (p *deadMock) ChainID() string { return p.chainID }
|
|
|
|
func (p *deadMock) String() string { return "deadMock" }
|
|
|
|
func (p *deadMock) SignedHeader(height int64) (*types.SignedHeader, error) {
|
|
return nil, errNoResp
|
|
}
|
|
|
|
func (p *deadMock) ValidatorSet(height int64) (*types.ValidatorSet, error) {
|
|
return nil, errNoResp
|
|
}
|
|
func (p *deadMock) ReportEvidence(ev types.Evidence) error {
|
|
return errNoResp
|
|
}
|