From 3464d1cf9bb0975123951263ece401dad41b844a Mon Sep 17 00:00:00 2001 From: artem Date: Fri, 14 Jun 2019 16:32:25 +0300 Subject: [PATCH] Add note on blockbook bechavior in case of backend(blockchain) reorganization --- docs/api.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index ec316491..0273c1ee 100644 --- a/docs/api.md +++ b/docs/api.md @@ -108,6 +108,8 @@ Response: } ``` +_Note: Blockbook always follows the main chain of the backend it is attached to. See notes on **Get Block** below_ + #### Get transaction Get transaction returns "normalized" data about transaction, which has the same general structure for all supported coins. It does not return coin specific fields (for example information about Zcash shielded addresses). ``` @@ -525,6 +527,7 @@ Response: ] } ``` +_Note: Blockbook always follows the main chain of the backend it is attached to. If there is a rollback-reorg in the backend, Blockbook will also do rollback. When you ask for block by height, you will always get the main chain block.If you ask for block by hash, you may get the block from another fork but it is not guaranteed (backend may not keep it)_ #### Send transaction @@ -573,4 +576,6 @@ The client can subscribe to the following events: - new block added to blockchain - new transaction for given address (list of addresses) -There can be always only one subscription of given event per connection, i.e. new list of addresses replaces previous list of addresses. \ No newline at end of file +There can be always only one subscription of given event per connection, i.e. new list of addresses replaces previous list of addresses. + +_Note: If there is reorg on backend(blockchain), you will get a new block hash with the same or even smaller height if the reorg is deeper_