[#274] pkg/client: Add epoch field to SendIntermediateTrustPrm

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-04-22 11:09:36 +03:00 committed by Alex Vanin
parent 541a56aae1
commit 0f7a14a69f

View file

@ -87,11 +87,21 @@ func (c *clientImpl) SendLocalTrust(ctx context.Context, prm SendLocalTrustPrm,
// SendIntermediateTrustPrm groups parameters of SendIntermediateTrust operation.
type SendIntermediateTrustPrm struct {
epoch uint64
iter uint32
trust *reputation.PeerToPeerTrust
}
func (x *SendIntermediateTrustPrm) Epoch() uint64 {
return x.epoch
}
func (x *SendIntermediateTrustPrm) SetEpoch(epoch uint64) {
x.epoch = epoch
}
// Iteration returns sequence number of the iteration.
func (x SendIntermediateTrustPrm) Iteration() uint32 {
return x.iter
@ -124,6 +134,7 @@ func (c *clientImpl) SendIntermediateTrust(ctx context.Context, prm SendIntermed
}
reqBody := new(v2reputation.SendIntermediateResultRequestBody)
reqBody.SetEpoch(prm.Epoch())
reqBody.SetIteration(prm.Iteration())
reqBody.SetTrust(prm.Trust().ToV2())