[#355] v2/refs: add subnetwork ID

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-11-17 16:58:38 +03:00 committed by LeL
parent ad6a7999cd
commit 68f28a1918
2 changed files with 26 additions and 0 deletions

View file

@ -30,6 +30,10 @@ type Signature struct {
key, sign []byte
}
type SubnetID struct {
value uint32
}
type Version struct {
major, minor uint32
}
@ -166,6 +170,19 @@ func (s *Signature) SetSign(v []byte) {
}
}
func (s *SubnetID) SetValue(id uint32) {
if s != nil {
s.value = id
}
}
func (s *SubnetID) GetValue() uint32 {
if s != nil {
return s.value
}
return 0
}
func (v *Version) GetMajor() uint32 {
if v != nil {
return v.major