Skip to content

Add block-by-id and id-by-height consensus endpoints

Christopher Schinnerl requested to merge consensus-blocks-endpoint into master

Created by: ChrisSchinnerl

This PR adds 2 endpoints.

  1. the /consensus/blocks/:id endpoint which allows a user to retrieve a whole block by id
  2. the /consensus/headers/:height endpoint. This might return the whole header in the future but only returns the BlockID at the moment.

I chose 2 separate wildcards since one endpoint returns a block and the other one is mostly used to return information about the block. In the future we might also add /consensus/blocks/:height or consensus/headers/:id in case it becomes necessary.

Merge request reports