diff --git a/netmap/node_info.go b/netmap/node_info.go index 8e287f43..bc4bd64b 100644 --- a/netmap/node_info.go +++ b/netmap/node_info.go @@ -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. @@ -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"