mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
c0076cc7a2
* Move interfaces from github.com/prysmaticlabs/prysm/beacon-chain/state/interface to github.com/prysmaticlabs/prysm/beacon-chain/state * remove/rename state2
24 lines
496 B
Go
24 lines
496 B
Go
package testutil
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/state"
|
|
)
|
|
|
|
// MockFetcher is a fake implementation of statefetcher.Fetcher.
|
|
type MockFetcher struct {
|
|
BeaconState state.BeaconState
|
|
BeaconStateRoot []byte
|
|
}
|
|
|
|
// State --
|
|
func (m *MockFetcher) State(context.Context, []byte) (state.BeaconState, error) {
|
|
return m.BeaconState, nil
|
|
}
|
|
|
|
// StateRoot --
|
|
func (m *MockFetcher) StateRoot(context.Context, []byte) ([]byte, error) {
|
|
return m.BeaconStateRoot, nil
|
|
}
|