[#170] version: Add docs, refactor

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2022-03-23 18:35:44 +03:00 committed by LeL
parent 3e75660802
commit ade8822a2f
21 changed files with 142 additions and 144 deletions

View file

@ -4,6 +4,7 @@ import (
"crypto/ecdsa"
"fmt"
"github.com/nspcc-dev/neofs-api-go/v2/refs"
"github.com/nspcc-dev/neofs-api-go/v2/rpc/client"
v2session "github.com/nspcc-dev/neofs-api-go/v2/session"
"github.com/nspcc-dev/neofs-api-go/v2/signature"
@ -159,7 +160,9 @@ func (x contextCall) prepareRequest() {
}
if meta.GetVersion() == nil {
meta.SetVersion(version.Current().ToV2())
var verV2 refs.Version
version.Current().WriteToV2(&verV2)
meta.SetVersion(&verV2)
}
meta.SetNetworkMagic(x.netMagic)