Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] rest api for /blocks?start=...&end=... does not include last block #3387

Open
andrezorzo opened this issue Aug 28, 2024 · 1 comment
Open
Labels
bug Incorrect or unexpected behavior

Comments

@andrezorzo
Copy link

andrezorzo commented Aug 28, 2024

🐛 Bug Report

This is a low priority bug.

The documentation says that GET /testnet/blocks?start={start_height}&end={end_height} should return blocks from the given block range, but when requested with start=1&end=2, the output is not including the block 2, and the response is a list with only block 1. Also, if provided start=1&end=1 it will not return any blocks.

Steps to Reproduce

Just curl the rest api with any block range:

curl 'http://127.0.0.1:3030/canary/blocks?start=1&end=2' | jq '.[].header.metadata.height'
1

curl 'http://127.0.0.1:3030/canary/blocks?start=1&end=3' | jq '.[].header.metadata.height'
1
2

Expected Behavior

Expected that when requested a block range, all the blocks in the range should be returned.

@andrezorzo andrezorzo added the bug Incorrect or unexpected behavior label Aug 28, 2024
@raychu86
Copy link
Contributor

Same issue as #3394.

Here is some context - #3394 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect or unexpected behavior
Projects
None yet
Development

No branches or pull requests

2 participants