[#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

@ -10,7 +10,7 @@ import (
"github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/common"
intermediatereputation "github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/intermediate"
localreputation "github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/local"
rptwrapper "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/morph/event"
"github.com/nspcc-dev/neofs-node/pkg/morph/event/netmap"
grpcreputation "github.com/nspcc-dev/neofs-node/pkg/network/transport/reputation/grpc"
@ -32,7 +32,7 @@ import (
)
func initReputationService(c *cfg) {
wrap, err := rptwrapper.NewFromMorph(c.cfgMorph.client, c.cfgReputation.scriptHash, 0, rptwrapper.TryNotary())
wrap, err := repClient.NewFromMorph(c.cfgMorph.client, c.cfgReputation.scriptHash, 0, repClient.TryNotary())
fatalOnErr(err)
localKey := c.key.PublicKey().Bytes()

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())