mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-09 03:01:19 +00:00
38 lines
799 B
Go
38 lines
799 B
Go
|
package testutil
|
||
|
|
||
|
import (
|
||
|
"math/big"
|
||
|
)
|
||
|
|
||
|
// MockGenesisTimeFetcher is a fake implementation of the powchain.ChainInfoFetcher
|
||
|
type MockPOWChainInfoFetcher struct {
|
||
|
CurrEndpoint string
|
||
|
CurrError error
|
||
|
Endpoints []string
|
||
|
Errors []error
|
||
|
}
|
||
|
|
||
|
func (m *MockPOWChainInfoFetcher) Eth2GenesisPowchainInfo() (uint64, *big.Int) {
|
||
|
return uint64(0), &big.Int{}
|
||
|
}
|
||
|
|
||
|
func (m *MockPOWChainInfoFetcher) IsConnectedToETH1() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
func (m *MockPOWChainInfoFetcher) CurrentETH1Endpoint() string {
|
||
|
return m.CurrEndpoint
|
||
|
}
|
||
|
|
||
|
func (m *MockPOWChainInfoFetcher) CurrentETH1ConnectionError() error {
|
||
|
return m.CurrError
|
||
|
}
|
||
|
|
||
|
func (m *MockPOWChainInfoFetcher) ETH1Endpoints() []string {
|
||
|
return m.Endpoints
|
||
|
}
|
||
|
|
||
|
func (m *MockPOWChainInfoFetcher) ETH1ConnectionErrors() []error {
|
||
|
return m.Errors
|
||
|
}
|