(ctx context.Context, network *Network, nq *common.NormalizedRequest)
| 254 | } |
| 255 | |
| 256 | func (p *PreparedProject) doForward(ctx context.Context, network *Network, nq *common.NormalizedRequest) (*common.NormalizedResponse, error) { |
| 257 | switch network.cfg.Architecture { |
| 258 | case common.ArchitectureEvm: |
| 259 | // Early, project-level pre-forward (cache-affecting, upstream-agnostic) |
| 260 | if handled, resp, err := evm.HandleProjectPreForward(ctx, network, nq); handled { |
| 261 | return evm.HandleNetworkPostForward(ctx, network, nq, resp, err) |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | // If not handled, then fallback to the normal forward |
| 266 | resp, err := network.Forward(ctx, nq) |
| 267 | return evm.HandleNetworkPostForward(ctx, network, nq, resp, err) |
| 268 | } |
| 269 | |
| 270 | func (p *PreparedProject) AcquireRateLimitPermit(ctx context.Context, req *common.NormalizedRequest) error { |
| 271 | if p.Config.RateLimitBudget == "" { |
no test coverage detected