aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[Bug] `/transactions?limit=1` returns every transaction when there are few transactions

Open banool opened this issue 2 years ago • 0 comments

$  curl http://localhost:8080/v1/transactions?limit=1 | jq '.[] | length'
18

This command output pretty much says it all. There is a bug somewhere in how we calculate limits (likely in page.rs) where if there are few transactions (I believe probably < than the default limit value), it ignores the limit field and just returns all of them.

Should be an easy fix.

banool avatar Jul 27 '22 21:07 banool