2022-12-21 13:01:04 +00:00
|
|
|
package mock
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/state"
|
|
|
|
types "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
|
|
|
|
eth "github.com/prysmaticlabs/prysm/v3/proto/prysm/v1alpha1"
|
|
|
|
)
|
|
|
|
|
|
|
|
// PoolMock is a fake implementation of PoolManager.
|
|
|
|
type PoolMock struct {
|
|
|
|
Changes []*eth.SignedBLSToExecutionChange
|
|
|
|
}
|
|
|
|
|
|
|
|
// PendingBLSToExecChanges --
|
|
|
|
func (m *PoolMock) PendingBLSToExecChanges() ([]*eth.SignedBLSToExecutionChange, error) {
|
|
|
|
return m.Changes, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// BLSToExecChangesForInclusion --
|
2023-01-23 14:11:45 +00:00
|
|
|
func (m *PoolMock) BLSToExecChangesForInclusion(_ state.ReadOnlyBeaconState) ([]*eth.SignedBLSToExecutionChange, error) {
|
2022-12-21 13:01:04 +00:00
|
|
|
return m.Changes, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// InsertBLSToExecChange --
|
|
|
|
func (m *PoolMock) InsertBLSToExecChange(change *eth.SignedBLSToExecutionChange) {
|
|
|
|
m.Changes = append(m.Changes, change)
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarkIncluded --
|
2023-01-23 14:11:45 +00:00
|
|
|
func (*PoolMock) MarkIncluded(_ *eth.SignedBLSToExecutionChange) {
|
2022-12-21 13:01:04 +00:00
|
|
|
panic("implement me")
|
|
|
|
}
|
|
|
|
|
|
|
|
// ValidatorExists --
|
|
|
|
func (*PoolMock) ValidatorExists(_ types.ValidatorIndex) bool {
|
|
|
|
panic("implement me")
|
|
|
|
}
|