mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
092e9e1d19
* Clean up various warnings * Update beacon-chain/rpc/prysm/v1alpha1/debug/state_test.go Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> * Fix redundant casting genState Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
38 lines
796 B
Go
38 lines
796 B
Go
package testutil
|
|
|
|
import (
|
|
"math/big"
|
|
)
|
|
|
|
// MockPOWChainInfoFetcher is a fake implementation of the powchain.ChainInfoFetcher
|
|
type MockPOWChainInfoFetcher struct {
|
|
CurrEndpoint string
|
|
CurrError error
|
|
Endpoints []string
|
|
Errors []error
|
|
}
|
|
|
|
func (*MockPOWChainInfoFetcher) Eth2GenesisPowchainInfo() (uint64, *big.Int) {
|
|
return uint64(0), &big.Int{}
|
|
}
|
|
|
|
func (*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
|
|
}
|