From 0f7a14a69f49a115fc0feed4981a8f2b50cfad43 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Thu, 22 Apr 2021 11:09:36 +0300 Subject: [PATCH] [#274] pkg/client: Add `epoch` field to `SendIntermediateTrustPrm` Signed-off-by: Pavel Karpy --- pkg/client/reputation.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/client/reputation.go b/pkg/client/reputation.go index 2ee6bc1f..a096efb2 100644 --- a/pkg/client/reputation.go +++ b/pkg/client/reputation.go @@ -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())