Skip to content

Commit

Permalink
Generate inaccessible while waiting if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka committed May 16, 2023
1 parent 367d64c commit 98ca082
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/api/chainHead_unstable_storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ The `waiting-for-continue` event is generated after at least one `"item"` event

This event only ever happens if the `type` parameter was `descendants-values` or `descendants-hashes`.

While the JSON-RPC server is waiting for a call to `chainHead_unstable_storageContinue`, it can generate an `inaccessible` event in order to indicate that it can no longer proceed with the request. If that is the case, the JSON-RPC client can simply try again.

### done

```json
Expand Down
4 changes: 3 additions & 1 deletion src/api/chainHead_unstable_storageContinue.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

Resumes a storage fetch started with `chainHead_unstable_storage` after it has generated a `waiting-for-continue` event.

Has no effect if the `subscription` is invalid or refers to a subscription that has emitted a `{"event": "inaccessible"}` event.

## Possible errors

- A JSON-RPC error is generated if the `subscription` is invalid or hasn't generated a `waiting-for-continue` event.
- A JSON-RPC error is generated if the `subscription` hasn't generated a `waiting-for-continue` event.

0 comments on commit 98ca082

Please sign in to comment.