Skip to content

Commit ef4006c

Browse files
committed
fix mocks in throttle_test
1 parent 810ddaa commit ef4006c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

engine/execution/ingestion/throttle_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,13 @@ func (h *headerStore) Store(proposal *flow.ProposalHeader) error {
242242
func (h *headerStore) ProposalByBlockID(blockID flow.Identifier) (*flow.ProposalHeader, error) {
243243
return nil, nil
244244
}
245+
246+
func (h *headerStore) ByView(view uint64) (*flow.Header, error) {
247+
// Find header with matching view
248+
for _, header := range h.byID {
249+
if header.View == view {
250+
return header, nil
251+
}
252+
}
253+
return nil, fmt.Errorf("no header found for view %d", view)
254+
}

0 commit comments

Comments
 (0)