Skip to content

Commit e4a702a

Browse files
committed
standardize "history too large" error code
1 parent 772f036 commit e4a702a

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

docs/protocol-changes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ Changes
239239
which aims to provide some clarity re whether the server supports optional features.
240240
* :func:`server.ping` can now also be sent as an unrequested notification, by both the client
241241
and the server. The request/response signature also changed.
242+
* Standardize "history too large" error code for `blockchain.scriptpubkey.*` methods.
242243

243244
New methods
244245
-----------

docs/protocol-methods.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,10 @@ Return the confirmed and unconfirmed history of a :ref:`scriptPubKey <scriptpubk
329329
See :func:`blockchain.scriptpubkey.get_mempool` for how mempool
330330
transactions are returned.
331331

332+
If the history of the spk is too long (busy address, touched by thousands of txs),
333+
and so the server refuses to serve it, it SHOULD send a JSON-RPC error with integer code `10_001`
334+
to communicate this to the client.
335+
332336
**Result Examples**
333337

334338
::
@@ -507,6 +511,10 @@ Subscribe to a :ref:`scriptPubKey <scriptpubkeys>`.
507511
.. function:: blockchain.scriptpubkey.subscribe(scripthash, status)
508512
:noindex:
509513

514+
If the history of the spk is too long (busy address, touched by thousands of txs),
515+
and so the server refuses to serve it, it SHOULD send a JSON-RPC error with integer code `10_001`
516+
to communicate this to the client.
517+
510518
blockchain.scriptpubkey.unsubscribe
511519
===================================
512520

0 commit comments

Comments
 (0)