block-explorer
block-explorer copied to clipboard
Improve the block loading for the block view
Update the block API to retrieve a block from the database and fallback to the xsnd.
Expected behavior
There are two endpoints for loading a block:
-
GET /blocks/:query-> Loads the block data from the database. -
GET /blocks/:query/legacy-> Loads the block data from the xsnd.
The web-ui tries to load a block from the database, when it isn't present, it tries to load it from the xsnd, a message is displayed if it doesn't exists.
When the 1st method is used, the confirmations field should be computed on the client.
Actual behavior
The GET /blocks/:query loads a block from the block from the xsnd while we might have it on the database.