[#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:
Leonard Lyubich 2020-08-05 22:29:11 +03:00 committed by Stanislav Bogatyrev
parent c88d1fdae3
commit 7c71813d22
2 changed files with 22 additions and 3 deletions

View file

@ -24,6 +24,12 @@ message NodeInfo {
bytes PubKey = 2 [(gogoproto.jsontag) = "pubkey,omitempty"];
// Options is set of node optional information, such as storage capacity, node location, price and etc
repeated string Options = 3 [(gogoproto.jsontag) = "options,omitempty"];
// Status is bitmap status of the node
uint64 Status = 4 [(gogoproto.jsontag) = "status", (gogoproto.nullable) = false, (gogoproto.customtype) = "NodeStatus"];
enum State {
Unknown = 0;
Online = 1;
Offline = 2;
}
State state = 4;
}