[#274] pkg/client: Add epoch
field to SendIntermediateTrustPrm
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
541a56aae1
commit
0f7a14a69f
1 changed files with 11 additions and 0 deletions
|
@ -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())
|
||||
|
||||
|
|
Loading…
Reference in a new issue