2022-08-01 14:43:47 +00:00
|
|
|
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{}
|
|
|
|
}
|
|
|
|
|
2022-08-16 17:22:34 +00:00
|
|
|
func (*MockExecutionChainInfoFetcher) ExecutionClientConnected() bool {
|
2022-08-01 14:43:47 +00:00
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
2022-08-16 17:22:34 +00:00
|
|
|
func (m *MockExecutionChainInfoFetcher) ExecutionClientEndpoint() string {
|
2022-08-01 14:43:47 +00:00
|
|
|
return m.CurrEndpoint
|
|
|
|
}
|
|
|
|
|
2022-08-16 17:22:34 +00:00
|
|
|
func (m *MockExecutionChainInfoFetcher) ExecutionClientConnectionErr() error {
|
2022-08-01 14:43:47 +00:00
|
|
|
return m.CurrError
|
|
|
|
}
|