Skip to content
Unverified Commit f8ab1ec9 authored by Tarik Gul's avatar Tarik Gul Committed by GitHub
Browse files

feat: add `/blocks` that enforces `range` query param. (#954)

* Add range query param type

* correctly parse a range or throw an error

* create new endpoint to query a range of blocks using an async generator

* lint, add `/blocks` route

* fix grumbles

* fix blunder

* sort collection of responses, add comments for range algorithm

* add return types

* cleanup QueueNext type

* port runTasks to AbstractController, and make it generic

* add PromiseQueue

* fix memory allocation, and remove async generator

* add PromiseQueue

* use PromiseQueue

* lint

* remove console

* fix verifyInt

* add /blocks to docs

* change BlockRange to Blocks

* set a max range, extra error handling

* add verifyUInt within util

* remove this.verifyInt and replace it with verifyUInt and verifyNonZeroUInt

* correct error message

* fix small async await grumble

* refactor calling each promise

* allow parseNumberOrThrow to accept zeroes

* fix comment grumble
parent b7a5843e
Pipeline #199138 passed with stages
in 18 minutes and 25 seconds