2022-01-26 08:48:20 -06:00
|
|
|
package mock
|
2021-02-24 16:29:25 +01:00
|
|
|
|
|
|
|
import (
|
2024-02-14 21:46:47 -08:00
|
|
|
"github.com/prysmaticlabs/prysm/v5/beacon-chain/state"
|
|
|
|
"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives"
|
|
|
|
eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1"
|
2021-02-24 16:29:25 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// PoolMock is a fake implementation of PoolManager.
|
|
|
|
type PoolMock struct {
|
|
|
|
Exits []*eth.SignedVoluntaryExit
|
|
|
|
}
|
|
|
|
|
|
|
|
// PendingExits --
|
2023-03-01 17:44:00 +01:00
|
|
|
func (m *PoolMock) PendingExits() ([]*eth.SignedVoluntaryExit, error) {
|
|
|
|
return m.Exits, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// ExitsForInclusion --
|
|
|
|
func (m *PoolMock) ExitsForInclusion(_ state.ReadOnlyBeaconState, _ primitives.Slot) ([]*eth.SignedVoluntaryExit, error) {
|
|
|
|
return m.Exits, nil
|
2021-02-24 16:29:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// InsertVoluntaryExit --
|
2023-03-01 17:44:00 +01:00
|
|
|
func (m *PoolMock) InsertVoluntaryExit(exit *eth.SignedVoluntaryExit) {
|
2021-03-01 17:08:39 +01:00
|
|
|
m.Exits = append(m.Exits, exit)
|
2021-02-24 16:29:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// MarkIncluded --
|
|
|
|
func (*PoolMock) MarkIncluded(_ *eth.SignedVoluntaryExit) {
|
|
|
|
panic("implement me")
|
|
|
|
}
|