( ctx context.Context, ups common.Upstream, req *evm.QueryBlocksRequest, onPage func(proto.Message) error, )
| 31 | } |
| 32 | |
| 33 | func (qe *EvmQueryExecutor) pipeThroughQueryBlocks( |
| 34 | ctx context.Context, |
| 35 | ups common.Upstream, |
| 36 | req *evm.QueryBlocksRequest, |
| 37 | onPage func(proto.Message) error, |
| 38 | ) error { |
| 39 | client, ok := getGrpcBdsClient(ups) |
| 40 | if !ok || client.QueryClient() == nil { |
| 41 | return fmt.Errorf("upstream %s does not support query streaming", ups.Id()) |
| 42 | } |
| 43 | qe.logger.Debug().Str("upstreamId", ups.Id()).Msgf("opening QueryBlocks stream to upstream") |
| 44 | stream, err := client.QueryClient().QueryBlocks(ctx, req) |
| 45 | if err != nil { |
| 46 | qe.logger.Debug().Err(err).Str("upstreamId", ups.Id()).Msgf("failed to open QueryBlocks stream") |
| 47 | return err |
| 48 | } |
| 49 | return qe.recvProtoStream(func() (proto.Message, error) { return stream.Recv() }, onPage, "eth_queryBlocks", ups.Id()) |
| 50 | } |
| 51 | |
| 52 | func (qe *EvmQueryExecutor) pipeThroughQueryTransactions( |
| 53 | ctx context.Context, |
no test coverage detected