[#1570] Upgrade NeoFS SDK Go with changed reputation API

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-07-04 16:24:51 +03:00 committed by LeL
parent 9a6da336db
commit 9a11a75b77
28 changed files with 146 additions and 158 deletions

View file

@ -82,15 +82,12 @@ type RemoteTrustWriter struct {
}
func (rtp *RemoteTrustWriter) Write(t reputation.Trust) error {
apiTrust := reputationapi.NewTrust()
apiPeer := reputationapi.NewPeerID()
apiPeer.SetPublicKey(t.Peer())
var apiTrust reputationapi.Trust
apiTrust.SetValue(t.Value().Float64())
apiTrust.SetPeer(apiPeer)
apiTrust.SetPeer(t.Peer())
rtp.buf = append(rtp.buf, *apiTrust)
rtp.buf = append(rtp.buf, apiTrust)
return nil
}