Skip to content

Commit 13d985e

Browse files
Set the 100 as the maximum value that the limit var can be
1 parent 2305a4c commit 13d985e

File tree

1 file changed

+4
-1
lines changed
  • aggregation_mode/batcher/src/server

1 file changed

+4
-1
lines changed

aggregation_mode/batcher/src/server/http.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ impl BatcherServer {
206206
.json(AppResponse::new_unsucessfull("Invalid address", 400));
207207
}
208208

209-
let limit = params.limit.unwrap_or(100); // We take 100 as the default limit value
209+
let limit = match params.limit {
210+
Some(received_limit) => received_limit.min(100),
211+
None => 100,
212+
};
210213

211214
let address = params.address.to_lowercase();
212215

0 commit comments

Comments
 (0)