Problem: HTTP API docs wrong regarding the mode parameter (#2481)

Solution: Edit those docs to be accurate
This commit is contained in:
Troy McConaghy 2018-08-27 15:01:55 +02:00 committed by Lev Berman
parent 41a2687b9b
commit d78ff75225

View File

@ -135,13 +135,21 @@ Transactions
:query string mode: (Optional) One of the three supported modes to send a transaction: ``async``, ``sync``, ``commit``. The default is ``async``. :query string mode: (Optional) One of the three supported modes to send a transaction: ``async``, ``sync``, ``commit``. The default is ``async``.
The ``mode`` query parameter inhereted from the mode parameter in Tendermint's Once the posted transaction arrives at a BigchainDB node,
`broadcast API that node will check to see if the transaction is valid.
<http://tendermint.readthedocs.io/projects/tools/en/master/using-tendermint.html#broadcast-api>`_. If it's invalid, the node will return an HTTP 400 (error).
``mode=async`` means the HTTP response will come back immediately, without Otherwise, the node will send the transaction to Tendermint (in the same node) using the
even checking to see if the transaction is valid. `Tendermint broadcast API
``mode=sync`` means the HTTP response will come back once the node has <https://tendermint.com/docs/tendermint-core/using-tendermint.html#broadcast-api>`_.
checked the validity of the transaction.
The meaning of the ``mode`` query parameter is inherited from the mode parameter in
`Tendermint's broadcast API
<https://tendermint.com/docs/tendermint-core/using-tendermint.html#broadcast-api>`_.
``mode=async`` means the HTTP response will come back immediately,
before Tendermint asks BigchainDB Server to check the validity of the transaction (a second time).
``mode=sync`` means the HTTP response will come back
after Tendermint gets a response from BigchainDB Server
regarding the validity of the transaction.
``mode=commit`` means the HTTP response will come back once the transaction ``mode=commit`` means the HTTP response will come back once the transaction
is in a committed block. is in a committed block.