Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/Add version attribute setter #490

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions netmap/node_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ func (x *NodeInfo) SetCapacity(capacity uint64) {
x.setNumericAttribute(attrCapacity, capacity)
}

// SetVersion sets node's version. By default, version
// is not announced.
func (x *NodeInfo) SetVersion(version string) {
x.SetAttribute(attrVersion, version)
}

// capacity returns capacity set using SetCapacity.
//
// Zero NodeInfo has zero capacity.
Expand Down Expand Up @@ -359,6 +365,10 @@ const (
// price in GAS tokens for storing one GB of data during one Epoch.
attrPrice = "Price"

// attrVersion is a key to the node attribute that indicates node's
// version.
attrVersion = "Version"

// attrCapacity is a key to the node attribute that indicates the
// total available disk space in Gigabytes.
attrCapacity = "Capacity"
Expand Down
Loading