Use block-hash
header value to determine which block to use for subsequent requests.
#229
Labels
good first issue
Good for newcomers
[Prio] Low
Should be fixed if time permits but can be postponed.
[Type] Change Request
Some visible functionality should be change.
Description
In numerous places, the client currently uses
GetBlockInfo
to get the actual block hash used when querying the best block. Subsequent requests then specify said block hash to consistently retrieve info from that block, instead of having each request use the best block hash at the time of the request. This is necessary since the best block may change in between the subsequent calls, and this could lead to inconsistencies.However, the GRPC API v2 already includes a
block-hash
header in its response that contains the block hash if the block from which the information was retrieved. It would be preferable to use this in favor of the aforementioned pattern as it is not only more concise and reduces the number of requests made.The text was updated successfully, but these errors were encountered: