[#1377] oid, cid: Upgrade SDK package

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-05-12 19:37:46 +03:00 committed by LeL
parent f65898a354
commit f15e6e888f
118 changed files with 1455 additions and 886 deletions

View file

@ -2,6 +2,7 @@ package audit
import (
"context"
"crypto/sha256"
"encoding/hex"
clientcore "github.com/nspcc-dev/neofs-node/pkg/core/client"
@ -46,6 +47,8 @@ func (ap *Processor) processStartAudit(epoch uint64) {
var auditCtx context.Context
auditCtx, ap.prevAuditCanceler = context.WithCancel(context.Background())
pivot := make([]byte, sha256.Size)
for i := range containers {
cnr, err := cntClient.Get(ap.containerClient, containers[i]) // get container structure
if err != nil {
@ -56,7 +59,7 @@ func (ap *Processor) processStartAudit(epoch uint64) {
continue
}
pivot := containers[i].ToV2().GetValue()
containers[i].Encode(pivot)
// find all container nodes for current epoch
nodes, err := nm.GetContainerNodes(cnr.PlacementPolicy(), pivot)