prysm-pulse/beacon-chain/rpc/testutil/mock_exec_chain_info_fetcher.go
terencechain 2728b83f6a
Remove Execution Client Fallback and Make Providing an Execution Client Required (#10921)
* Starting

* Done

* Fix more tests

* Fix test

* Fix test

* fix up

* building

* requirement

* gaz

* builds

* rem deadcode

* fix

* fix up

* removed checked method

* Update service_test.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2022-08-16 17:22:34 +00:00

28 lines
631 B
Go

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
}