[#625] client/reputation: remove intermediate wrapper

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-01-31 15:19:10 +03:00 committed by Alex Vanin
parent 97d18bc515
commit 767ee5c0cd
13 changed files with 145 additions and 375 deletions

View file

@ -4,7 +4,7 @@ import (
"crypto/ecdsa"
"fmt"
"github.com/nspcc-dev/neofs-node/pkg/morph/client/reputation/wrapper"
repClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/reputation"
"github.com/nspcc-dev/neofs-node/pkg/services/reputation/eigentrust"
eigentrustcalc "github.com/nspcc-dev/neofs-node/pkg/services/reputation/eigentrust/calculator"
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
@ -20,7 +20,7 @@ import (
type FinalWriterProviderPrm struct {
PrivatKey *ecdsa.PrivateKey
PubKey []byte
Client *wrapper.ClientWrapper
Client *repClient.Client
}
// NewFinalWriterProvider creates a new instance of the FinalWriterProvider.
@ -64,13 +64,13 @@ func (fwp FinalWriterProvider) InitIntermediateWriter(
type FinalWriter struct {
privatKey *ecdsa.PrivateKey
pubKey []byte
client *wrapper.ClientWrapper
client *repClient.Client
l *logger.Logger
}
func (fw FinalWriter) WriteIntermediateTrust(t eigentrust.IterationTrust) error {
args := wrapper.PutArgs{}
args := repClient.PutPrm{}
var trustedPublicKey [33]byte
copy(trustedPublicKey[:], t.Peer().Bytes())