Block dontime and vault from callCapability and add default call limiter - #23634
Block dontime and vault from callCapability and add default call limiter#23634russell-stern wants to merge 1 commit into
Conversation
|
I see you updated files related to
|
|
✅ No conflicts with other open PRs targeting |
|
|
|
/vault-audit-skip not applicable |
sorry, why do you make this change? |
| if c.callCounts == nil { | ||
| c.callCounts = make(map[limits.Limiter[int]]int) | ||
| } | ||
| cnt := c.callCounts[limiter] + 1 |
There was a problem hiding this comment.
The limiter instance here is per execution, correct? For a moment I thought it might be one across all executions but each one gets a new ExecutionHelper object. Maybe worth adding a comment?
|
|
||
| // dontimeCapabilityID matches the capability ID registered by the OCR2 delegate | ||
| // (core/services/ocr2/delegate.go). | ||
| const dontimeCapabilityID = "dontime@1.0.0" |
There was a problem hiding this comment.
might be a better idea to match by name without the version (not a big deal for now)
| c.callCounts = make(map[limits.Limiter[int]]int) | ||
| } | ||
| cnt := c.callCounts[limiter] + 1 | ||
| if err := limiter.Check(ctx, cnt); err != nil { |
There was a problem hiding this comment.
nit: maybe check isSystemCapability before the limiter?




No description provided.