prysm-pulse/beacon-chain/operations/testing/mock.go
terence tsao 4432c88f73 Update beacon chain server AttestationPool (#3560)
* Run time bug

* Still failing

* Run time working

* Run time working

* Gazelle

* Fixed all the tests

* Revert config

* Revert back test configs

* Revert config

* Tested run time again, everything is good

* Implemented AttestationPoolNoVerify
2019-09-23 13:01:57 -05:00

29 lines
700 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
}
// HandleAttestation --
func (op *Operations) HandleAttestation(context.Context, proto.Message) error {
return nil
}