Correct boolean methods to follow JSON-RPC 1.0

This commit is contained in:
str4d 2016-09-26 11:20:36 +13:00 committed by Daira Hopwood
parent 0b2941372e
commit 26d4d827d8
1 changed files with 9 additions and 6 deletions

View File

@ -245,7 +245,8 @@ Response::
{"id": 2, "result": AUTHORIZED, "error": "ERROR"}\n {"id": 2, "result": AUTHORIZED, "error": "ERROR"}\n
``AUTHORIZED`` (bool) ``AUTHORIZED`` (bool)
Whether authorization succeeded. MUST be ``true`` if authorization succeeded. Per [JSON-RPC-1.0]_, MUST be
``null`` if there was an error.
``ERROR`` (obj) ``ERROR`` (obj)
An error object. MUST be ``null`` if authorization succeeded. An error object. MUST be ``null`` if authorization succeeded.
@ -359,14 +360,16 @@ Result::
{"id": 4, "result": ACCEPTED, "error": "ERROR"}\n {"id": 4, "result": ACCEPTED, "error": "ERROR"}\n
``ACCEPTED`` (bool) ``ACCEPTED`` (bool)
Whether the block was accepted. MUST be ``true`` if the submission was accepted. Per [JSON-RPC-1.0]_, MUST be
``null`` if there was an error.
``ERROR`` (obj) ``ERROR`` (obj)
An error object. MUST be ``null`` if the block was accepted. An error object. Per [JSON-RPC-1.0]_, MUST be ``null`` if the submission was
accepted without error.
If the block was not accepted, the server MUST provide an error object If the submission was not accepted, the server MUST provide an error object
describing the reason for not accepting the block. See `Error Objects`_ for describing the reason for not accepting the submission. See `Error Objects`_
the object format. for the object format.
``client.reconnect()`` ``client.reconnect()``
---------------------- ----------------------