prysm-pulse/beacon-chain/rpc/testutil/mock_exec_chain_info_fetcher.go

28 lines
631 B
Go
Raw Permalink Normal View History

package testutil
import (
"math/big"
)
// MockExecutionChainInfoFetcher is a fake implementation of the powchain.ChainInfoFetcher
type MockExecutionChainInfoFetcher struct {
CurrEndpoint string
CurrError error
}
func (*MockExecutionChainInfoFetcher) GenesisExecutionChainInfo() (uint64, *big.Int) {
return uint64(0), &big.Int{}
}
func (*MockExecutionChainInfoFetcher) ExecutionClientConnected() bool {
return true
}
func (m *MockExecutionChainInfoFetcher) ExecutionClientEndpoint() string {
return m.CurrEndpoint
}
func (m *MockExecutionChainInfoFetcher) ExecutionClientConnectionErr() error {
return m.CurrError
}