[#1648] morph: Change endpoint priority order

The lowest value means the highest priority.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-08-02 14:31:21 +03:00 committed by Pavel Karpy
parent 2467be0117
commit a97dee008c
10 changed files with 67 additions and 17 deletions

View file

@ -134,9 +134,9 @@ morph:
disable_cache: true
rpc_endpoint:
- address: wss://rpc1.morph.fs.neo.org:40341/ws
priority: 2
- address: wss://rpc2.morph.fs.neo.org:40341/ws
priority: 1
- address: wss://rpc2.morph.fs.neo.org:40341/ws
priority: 2
```
| Parameter | Type | Default value | Description |
@ -146,10 +146,10 @@ morph:
| `rpc_endpoint` | list of [endpoint descriptions](#rpc_endpoint-subsection) | | Array of endpoint descriptions. |
## `rpc_endpoint` subsection
| Parameter | Type | Default value | Description |
|------------|----------|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| `address` | `string` | | _WebSocket_ N3 endpoint. |
| `priority` | `int` | `0` | Priority of an endpoint. Endpoint with a higher priority has more chance of being used. Endpoints with equal priority are iterated over randomly. |
| Parameter | Type | Default value | Description |
|------------|----------|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `address` | `string` | | _WebSocket_ N3 endpoint. |
| `priority` | `int` | `1` | Priority of an endpoint. Endpoint with a higher priority (lower configuration value) has more chance of being used. Endpoints with equal priority are iterated over randomly; a negative priority is interpreted as `1`. |
# `storage` section