prysm-pulse/beacon-chain/operations/testing/mock.go
terence tsao f43a7c67f2 Process attestation to use operation service's pool (#4014)
* Starting

* Routine working

* Single client working

* Fixed all the tests

* Lint

* Gazelle

* 12

* Tests
2019-11-18 11:19:03 -06:00

34 lines
871 B
Go

package testing
import (
"context"
"github.com/gogo/protobuf/proto"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
)
// Operations defines a mock for the operations service.
type Operations struct {
Attestations []*ethpb.Attestation
}
// AttestationPool --
func (op *Operations) AttestationPool(ctx context.Context, requestedSlot uint64) ([]*ethpb.Attestation, error) {
return op.Attestations, nil
}
// AttestationPoolNoVerify --
func (op *Operations) AttestationPoolNoVerify(ctx context.Context) ([]*ethpb.Attestation, error) {
return op.Attestations, nil
}
// AttestationPoolForForkchoice --
func (op *Operations) AttestationPoolForForkchoice(ctx context.Context) ([]*ethpb.Attestation, error) {
return op.Attestations, nil
}
// HandleAttestation --
func (op *Operations) HandleAttestation(context.Context, proto.Message) error {
return nil
}