mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 19:23:41 +02:00
rest: allow reading partial block data from storage
It will allow fetching specific transactions using an external index, following https://github.com/bitcoin/bitcoin/pull/32541#issuecomment-3267485313. Co-authored-by: Hodlinator <172445034+hodlinator@users.noreply.github.com> Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
This commit is contained in:
@@ -47,6 +47,11 @@ 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.
|
||||
|
||||
- `GET /rest/blockpart/<BLOCK-HASH>.<bin|hex>?offset=<OFFSET>&size=<SIZE>`
|
||||
|
||||
Given a block hash: returns a block part, in binary or hex-encoded binary formats.
|
||||
Responds with 404 if the block or the byte range doesn't exist.
|
||||
|
||||
#### Blockheaders
|
||||
`GET /rest/headers/<BLOCK-HASH>.<bin|hex|json>?count=<COUNT=5>`
|
||||
|
||||
|
||||
5
doc/release-notes-33657.md
Normal file
5
doc/release-notes-33657.md
Normal file
@@ -0,0 +1,5 @@
|
||||
New REST API
|
||||
------------
|
||||
|
||||
- A new REST API endpoint (`/rest/blockpart/BLOCKHASH.bin?offset=X&size=Y`) has been introduced
|
||||
for efficiently fetching a range of bytes from block `BLOCKHASH`.
|
||||
Reference in New Issue
Block a user