prysm-pulse/beacon-chain/rpc/testutil/mock_exec_chain_info_fetcher.go
terencechain 699bfdfdb4
Rename pow to execution (#11135)
* Rename pow to execution

* Fix complain

* Fix complain
2022-08-01 14:43:47 +00:00

38 lines
846 B
Go

package testutil
import (
"math/big"
)
// MockExecutionChainInfoFetcher is a fake implementation of the powchain.ChainInfoFetcher
type MockExecutionChainInfoFetcher struct {
CurrEndpoint string
CurrError error
Endpoints []string
Errors []error
}
func (*MockExecutionChainInfoFetcher) GenesisExecutionChainInfo() (uint64, *big.Int) {
return uint64(0), &big.Int{}
}
func (*MockExecutionChainInfoFetcher) IsConnectedToETH1() bool {
return true
}
func (m *MockExecutionChainInfoFetcher) CurrentETH1Endpoint() string {
return m.CurrEndpoint
}
func (m *MockExecutionChainInfoFetcher) CurrentETH1ConnectionError() error {
return m.CurrError
}
func (m *MockExecutionChainInfoFetcher) ETH1Endpoints() []string {
return m.Endpoints
}
func (m *MockExecutionChainInfoFetcher) ETH1ConnectionErrors() []error {
return m.Errors
}