Issue
Fetching new blocks on the dashboard is currently very taxing. It first needs to fetch the block height, then fetch the corresponding block hash, then the block info, and then keep doing it for block height - 1 until the required number of blocks are fetched. This is ok for a small number of blocks, but far from optimal for a large number of blocks.
Solution
A new endpoint that takes in a "from block height" and "to block height" parameter and returns the array of blocks.
GET v1/bitcoind/info/blocks?from=<from block height>&to=<to block height>
Result:
[...blocks]
Issue Fetching new blocks on the dashboard is currently very taxing. It first needs to fetch the
block height
, then fetch the correspondingblock hash
, then theblock info
, and then keep doing it forblock height - 1
until the required number of blocks are fetched. This is ok for a small number of blocks, but far from optimal for a large number of blocks.Solution A new endpoint that takes in a "from block height" and "to block height" parameter and returns the array of blocks.