Skip to content

Commit 87a1493

Browse files
committed
Linted. Updated godoc
1 parent a21eee5 commit 87a1493

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

module/builder/collection/rate_limiter.go

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,10 @@ func (limiter *rateLimiter) shouldRateLimit(tx *flow.TransactionBody) bool {
114114
return false
115115
}
116116

117-
// BySealingLagRateLimiter implements collection throttling based on the sealing lag.
118-
// It can be configured to allow a minimum and maximum sealing lag, as well as a halving interval.
119-
type BySealingLagRateLimiter struct {
120-
state protocol.State
121-
minSealingLag uint
122-
maxSealingLag uint
123-
halvingInterval uint
124-
minCollectionSize uint
125-
maxCollectionSize uint
126-
currentCollectionSize uint
127-
}
128-
117+
// GetMaxCollectionSizeForSealingLag computes the maximum collection size based on the sealing lag using a step halving algorithm.
118+
// The function takes the current protocol state, minimum and maximum sealing lag, halving interval, minimum and maximum collection size as input parameters
119+
// and outputs a single uint representing the maximum collection size allowed for the current sealing lag.
120+
// No errors are expected during normal operations.
129121
func GetMaxCollectionSizeForSealingLag(
130122
state protocol.State,
131123
minSealingLag uint,

0 commit comments

Comments
 (0)