diff options
author | Pavel Zbitskiy <65323360+algorandskiy@users.noreply.github.com> | 2023-12-15 16:34:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-15 16:34:32 -0500 |
commit | 8f8ada5dfd10d82def3a9e171ce21a49fb86dd42 (patch) | |
tree | 1ca92ab6274387888bb858e477ca34417c787816 | |
parent | 937c559abd60348fd0d3c534980274288b66398e (diff) |
txHandler: fix ARL triggering without ERL (#5872)
-rw-r--r-- | data/txHandler.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/data/txHandler.go b/data/txHandler.go index 4689a497b..9e6e1094c 100644 --- a/data/txHandler.go +++ b/data/txHandler.go @@ -597,8 +597,10 @@ func (handler *TxHandler) processIncomingTxn(rawmsg network.IncomingMessage) net var err error var capguard *util.ErlCapacityGuard var congested bool - if handler.erl != nil { + if handler.erl != nil || handler.appLimiter != nil { congested = float64(cap(handler.backlogQueue))*handler.backlogCongestionThreshold < float64(len(handler.backlogQueue)) + } + if handler.erl != nil { // consume a capacity unit // if the elastic rate limiter cannot vend a capacity, the error it returns // is sufficient to indicate that we should enable Congestion Control, because |