Skip to content

Commit

Permalink
Update websockets.md
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiySW committed Apr 17, 2020
1 parent 7cf2a60 commit 5dcb714
Showing 1 changed file with 53 additions and 1 deletion.
54 changes: 53 additions & 1 deletion docs/integration-guides/websockets.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Current topics available for subscribing to include:
* `vote` (experimental, unfinished)
* `stopped_election`
* `active_difficulty`
* `bootstrap`

---

Expand Down Expand Up @@ -503,4 +504,55 @@ Notes:

- The duration is in milliseconds
- If work generation fails, the notification is similar to the work cancelled notification, except `"reason": "failure"`
- When work generation is done locally it will show `"source": "local"`
- When work generation is done locally it will show `"source": "local"`

#### Bootstrap

This subscription is available since _v21.0_

##### Subscribing

To subscribe to bootstrap attempts start/exit notifications:

```json
{
"action": "subscribe",
"topic": "bootstrap"
}
```

##### Filtering options

No filters are currently available for the `bootstrap` topic.

##### Sample Results

```json
{
"topic": "bootstrap",
"time": "1561661740065",
"message": {
"reason": "started",
"id": "C9FF2347C4DF512A7F6B514CC4A0F79A",
"mode": "legacy"
}
}
```

```json
{
"topic": "bootstrap",
"time": "1561661740565",
"message": {
"reason": "exited",
"id": "C9FF2347C4DF512A7F6B514CC4A0F79A",
"mode": "legacy",
"total_blocks": "1000000",
"duration": "500"
}
}
```

Notes:

- The duration is in seconds

0 comments on commit 5dcb714

Please sign in to comment.