From 710d1994a48f3149af76b1152e6a30cf6153e95d Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 1 Apr 2021 18:11:14 +0300 Subject: [PATCH] [#265] v2/rpc: Add SendIntermediateResult RPC Signed-off-by: Leonard Lyubich --- v2/rpc/reputation.go | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/v2/rpc/reputation.go b/v2/rpc/reputation.go index 6cef7068..88e2355c 100644 --- a/v2/rpc/reputation.go +++ b/v2/rpc/reputation.go @@ -9,7 +9,8 @@ import ( const serviceReputation = serviceNamePrefix + "reputation.ReputationService" const ( - rpcReputationSendLocalTrust = "SendLocalTrust" + rpcReputationSendLocalTrust = "SendLocalTrust" + rpcReputationSendIntermediateResult = "SendIntermediateResult" ) // SendLocalTrust executes ReputationService.SendLocalTrust RPC. @@ -27,3 +28,19 @@ func SendLocalTrust( return resp, nil } + +// SendIntermediateResult executes ReputationService.SendIntermediateResult RPC. +func SendIntermediateResult( + cli *client.Client, + req *reputation.SendIntermediateResultRequest, + opts ...client.CallOption, +) (*reputation.SendIntermediateResultRequest, error) { + resp := new(reputation.SendIntermediateResultRequest) + + err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceReputation, rpcReputationSendIntermediateResult), req, resp, opts...) + if err != nil { + return nil, err + } + + return resp, nil +}