forked from TrueCloudLab/frostfs-node
Update neofs-api-go to v1.26.0
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
bd6d5e7f7b
commit
d49bd4b94a
13 changed files with 42 additions and 42 deletions
|
@ -73,7 +73,7 @@ type RemoteTrustWriter struct {
|
|||
client apiClient.Client
|
||||
key *ecdsa.PrivateKey
|
||||
|
||||
buf []*apiClient.SendIntermediateTrustPrm
|
||||
buf []*apiClient.AnnounceIntermediateTrustPrm
|
||||
}
|
||||
|
||||
// Write check if passed context contains required
|
||||
|
@ -94,7 +94,7 @@ func (rtp *RemoteTrustWriter) Write(t reputation.Trust) error {
|
|||
apiPeerToPeerTrust.SetTrustingPeer(apiTrustingPeer)
|
||||
apiPeerToPeerTrust.SetTrust(apiTrust)
|
||||
|
||||
p := &apiClient.SendIntermediateTrustPrm{}
|
||||
p := &apiClient.AnnounceIntermediateTrustPrm{}
|
||||
p.SetEpoch(rtp.eiCtx.Epoch())
|
||||
p.SetIteration(rtp.eiCtx.I())
|
||||
p.SetTrust(apiPeerToPeerTrust)
|
||||
|
@ -108,7 +108,7 @@ func (rtp *RemoteTrustWriter) Write(t reputation.Trust) error {
|
|||
// If error occurs, returns in immediately and stops iteration.
|
||||
func (rtp *RemoteTrustWriter) Close() (err error) {
|
||||
for _, prm := range rtp.buf {
|
||||
_, err = rtp.client.SendIntermediateTrust(
|
||||
_, err = rtp.client.AnnounceIntermediateTrust(
|
||||
rtp.eiCtx,
|
||||
*prm,
|
||||
apiClient.WithKey(rtp.key),
|
||||
|
|
|
@ -84,12 +84,12 @@ func (rtp *RemoteTrustWriter) Write(t reputation.Trust) error {
|
|||
}
|
||||
|
||||
func (rtp *RemoteTrustWriter) Close() error {
|
||||
prm := apiClient.SendLocalTrustPrm{}
|
||||
prm := apiClient.AnnounceLocalTrustPrm{}
|
||||
|
||||
prm.SetEpoch(rtp.ctx.Epoch())
|
||||
prm.SetTrusts(rtp.buf)
|
||||
|
||||
_, err := rtp.client.SendLocalTrust(
|
||||
_, err := rtp.client.AnnounceLocalTrust(
|
||||
rtp.ctx,
|
||||
prm,
|
||||
apiClient.WithKey(rtp.key),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue