diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-04-30 11:44:59 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-04-30 11:45:06 +0200 |
commit | afed2e98b0e3a059adf0b1f88ce2551e3b09733c (patch) | |
tree | 418fb5574e5c604064862a9ca9670756fb51b09c | |
parent | 35ef3c15ef8263b79c6e8f002ceab270f08cd5a5 (diff) | |
parent | ff6549c3c84ca7324032dbc37744645bf2fe1c3e (diff) |
Merge #18810: doc: update rest info on block size and json
ff6549c3c84ca7324032dbc37744645bf2fe1c3e fix: update rest info on block size and json (Chris Abrams)
Pull request description:
Addressing the ambiguous block size text in rest docs: https://github.com/bitcoin/bitcoin/issues/18703
Also makes sure to let developers know there is `.json` option for the rest output format.
ACKs for top commit:
MarcoFalke:
ACK ff6549c3c84ca7324032dbc37744645bf2fe1c3e
promag:
ACK ff6549c3c84ca7324032dbc37744645bf2fe1c3e.
Tree-SHA512: 9ef93c1432d650b1f9599778ba092c1ca5b084a537af257078e1c713c76c5d3a4cc4b1ede8a2489964be8ed0303ad8bea58c1cb4759bbb9b24dbdebfec8001d3
-rw-r--r-- | doc/REST-interface.md | 2 | ||||
-rw-r--r-- | src/rest.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/REST-interface.md b/doc/REST-interface.md index a63391e01a..11e9c90f49 100644 --- a/doc/REST-interface.md +++ b/doc/REST-interface.md @@ -30,7 +30,7 @@ To query for a confirmed transaction, enable the transaction index via "txindex= Given a block hash: returns a block, in binary, hex-encoded binary or JSON formats. Responds with 404 if the block doesn't exist. -The HTTP request and response are both handled entirely in-memory, thus making maximum memory usage at least 2.66MB (1 MB max block, plus hex encoding) per request. +The HTTP request and response are both handled entirely in-memory. With the /notxdetails/ option JSON response will only contain the transaction hash instead of the complete transaction details. The option only affects the JSON response. diff --git a/src/rest.cpp b/src/rest.cpp index aaaaba4cd0..5f99e26bad 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -206,7 +206,7 @@ static bool rest_headers(HTTPRequest* req, return true; } default: { - return RESTERR(req, HTTP_NOT_FOUND, "output format not found (available: .bin, .hex)"); + return RESTERR(req, HTTP_NOT_FOUND, "output format not found (available: .bin, .hex, .json)"); } } } |