@@ -390,6 +390,9 @@ func WithDeterministicAttesterDuties(factor int) Option {
390390
391391 return resp , nil
392392 }
393+ mock .CachedAttesterDutiesFunc = func (ctx context.Context , epoch eth2p0.Epoch ) ([]* eth2v1.AttesterDuty , error ) {
394+ return mock .AttesterDutiesFunc (ctx , epoch , []eth2p0.ValidatorIndex {})
395+ }
393396 }
394397}
395398
@@ -447,6 +450,9 @@ func WithNoProposerDuties() Option {
447450 mock .ProposerDutiesFunc = func (context.Context , eth2p0.Epoch , []eth2p0.ValidatorIndex ) ([]* eth2v1.ProposerDuty , error ) {
448451 return nil , nil
449452 }
453+ mock .CachedProposerDutiesFunc = func (ctx context.Context , epoch eth2p0.Epoch ) ([]* eth2v1.ProposerDuty , error ) {
454+ return mock .ProposerDutiesFunc (ctx , epoch , []eth2p0.ValidatorIndex {})
455+ }
450456 }
451457}
452458
@@ -456,6 +462,9 @@ func WithNoAttesterDuties() Option {
456462 mock .AttesterDutiesFunc = func (context.Context , eth2p0.Epoch , []eth2p0.ValidatorIndex ) ([]* eth2v1.AttesterDuty , error ) {
457463 return nil , nil
458464 }
465+ mock .CachedAttesterDutiesFunc = func (ctx context.Context , epoch eth2p0.Epoch ) ([]* eth2v1.AttesterDuty , error ) {
466+ return mock .AttesterDutiesFunc (ctx , epoch , []eth2p0.ValidatorIndex {})
467+ }
459468 }
460469}
461470
@@ -465,6 +474,9 @@ func WithNoSyncCommitteeDuties() Option {
465474 mock .SyncCommitteeDutiesFunc = func (context.Context , eth2p0.Epoch , []eth2p0.ValidatorIndex ) ([]* eth2v1.SyncCommitteeDuty , error ) {
466475 return nil , nil
467476 }
477+ mock .CachedSyncDutiesFunc = func (ctx context.Context , epoch eth2p0.Epoch ) ([]* eth2v1.SyncCommitteeDuty , error ) {
478+ return mock .SyncCommitteeDutiesFunc (ctx , epoch , []eth2p0.ValidatorIndex {})
479+ }
468480 }
469481}
470482
@@ -506,6 +518,9 @@ func WithDeterministicSyncCommDuties(n, k int) Option {
506518
507519 return resp , nil
508520 }
521+ mock .CachedSyncDutiesFunc = func (ctx context.Context , epoch eth2p0.Epoch ) ([]* eth2v1.SyncCommitteeDuty , error ) {
522+ return mock .SyncCommitteeDutiesFunc (ctx , epoch , []eth2p0.ValidatorIndex {})
523+ }
509524
510525 mock .overrides = append (mock .overrides , staticOverride {
511526 Endpoint : "/eth/v1/config/spec" ,
@@ -586,9 +601,15 @@ func defaultMock(httpMock HTTPMock, httpServer *http.Server, clock clockwork.Clo
586601 ProposerDutiesFunc : func (context.Context , eth2p0.Epoch , []eth2p0.ValidatorIndex ) ([]* eth2v1.ProposerDuty , error ) {
587602 return []* eth2v1.ProposerDuty {}, nil
588603 },
604+ CachedProposerDutiesFunc : func (context.Context , eth2p0.Epoch ) ([]* eth2v1.ProposerDuty , error ) {
605+ return []* eth2v1.ProposerDuty {}, nil
606+ },
589607 AttesterDutiesFunc : func (context.Context , eth2p0.Epoch , []eth2p0.ValidatorIndex ) ([]* eth2v1.AttesterDuty , error ) {
590608 return []* eth2v1.AttesterDuty {}, nil
591609 },
610+ CachedAttesterDutiesFunc : func (context.Context , eth2p0.Epoch ) ([]* eth2v1.AttesterDuty , error ) {
611+ return []* eth2v1.AttesterDuty {}, nil
612+ },
592613 BeaconBlockAttestationsFunc : func (context.Context , * eth2api.BeaconBlockAttestationsOpts ) ([]* eth2spec.VersionedAttestation , error ) {
593614 return []* eth2spec.VersionedAttestation {}, nil
594615 },
@@ -686,6 +707,9 @@ func defaultMock(httpMock HTTPMock, httpServer *http.Server, clock clockwork.Clo
686707 SyncCommitteeDutiesFunc : func (context.Context , eth2p0.Epoch , []eth2p0.ValidatorIndex ) ([]* eth2v1.SyncCommitteeDuty , error ) {
687708 return []* eth2v1.SyncCommitteeDuty {}, nil
688709 },
710+ CachedSyncDutiesFunc : func (context.Context , eth2p0.Epoch ) ([]* eth2v1.SyncCommitteeDuty , error ) {
711+ return []* eth2v1.SyncCommitteeDuty {}, nil
712+ },
689713 SyncCommitteeSelectionsFunc : func (_ context.Context , opts * eth2api.SyncCommitteeSelectionsOpts ) ([]* eth2v1.SyncCommitteeSelection , error ) {
690714 return opts .Selections , nil
691715 },
0 commit comments