2022-01-26 14:48:20 +00:00
|
|
|
package mock
|
2021-02-24 15:29:25 +00:00
|
|
|
|
|
|
|
import (
|
2022-08-16 12:20:13 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/state"
|
2023-01-26 14:40:12 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
|
2022-08-16 12:20:13 +00:00
|
|
|
eth "github.com/prysmaticlabs/prysm/v3/proto/prysm/v1alpha1"
|
2021-02-24 15:29:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// PoolMock is a fake implementation of PoolManager.
|
|
|
|
type PoolMock struct {
|
|
|
|
Exits []*eth.SignedVoluntaryExit
|
|
|
|
}
|
|
|
|
|
|
|
|
// PendingExits --
|
2023-03-01 16:44:00 +00: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 15:29:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// InsertVoluntaryExit --
|
2023-03-01 16:44:00 +00:00
|
|
|
func (m *PoolMock) InsertVoluntaryExit(exit *eth.SignedVoluntaryExit) {
|
2021-03-01 16:08:39 +00:00
|
|
|
m.Exits = append(m.Exits, exit)
|
2021-02-24 15:29:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MarkIncluded --
|
|
|
|
func (*PoolMock) MarkIncluded(_ *eth.SignedVoluntaryExit) {
|
|
|
|
panic("implement me")
|
|
|
|
}
|