[#34] bootstrap: Define node state enum in NodeInfo
Replaces Status field of NodeInfo with State field value of NodeInfo.State enumeration. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
c88d1fdae3
commit
7c71813d22
2 changed files with 22 additions and 3 deletions
|
@ -105,7 +105,7 @@ Node state
|
|||
| Address | [string](#string) | | Address is a node [multi-address](https://github.com/multiformats/multiaddr) |
|
||||
| PubKey | [bytes](#bytes) | | PubKey is a compressed public key representation in bytes |
|
||||
| Options | [string](#string) | repeated | Options is set of node optional information, such as storage capacity, node location, price and etc |
|
||||
| Status | [uint64](#uint64) | | Status is bitmap status of the node |
|
||||
| state | [NodeInfo.State](#bootstrap.NodeInfo.State) | | |
|
||||
|
||||
|
||||
<a name="bootstrap.SpreadMap"></a>
|
||||
|
@ -121,6 +121,19 @@ Node state
|
|||
|
||||
<!-- end messages -->
|
||||
|
||||
|
||||
<a name="bootstrap.NodeInfo.State"></a>
|
||||
|
||||
### NodeInfo.State
|
||||
|
||||
|
||||
| Name | Number | Description |
|
||||
| ---- | ------ | ----------- |
|
||||
| Unknown | 0 | |
|
||||
| Online | 1 | |
|
||||
| Offline | 2 | |
|
||||
|
||||
|
||||
<!-- end enums -->
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue