From 59db66cdb6c27d0e0355c7a034c6558a12793149 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 23 Nov 2022 18:12:21 +0300 Subject: [PATCH] [#2091] neofs-adm: Sign blocks properly in tests Signed-off-by: Evgenii Stratonikov --- cmd/neofs-adm/internal/modules/morph/local_client.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/neofs-adm/internal/modules/morph/local_client.go b/cmd/neofs-adm/internal/modules/morph/local_client.go index ea0f7d13d..4217b740a 100644 --- a/cmd/neofs-adm/internal/modules/morph/local_client.go +++ b/cmd/neofs-adm/internal/modules/morph/local_client.go @@ -1,7 +1,6 @@ package morph import ( - "bytes" "crypto/elliptic" "errors" "fmt" @@ -81,9 +80,7 @@ func newLocalClient(cmd *cobra.Command, v *viper.Viper, wallets []*wallet.Wallet return indexMap[string(pi)] < indexMap[string(pj)] }) sort.Slice(accounts[:cfg.ProtocolConfiguration.ValidatorsCount], func(i, j int) bool { - pi := accounts[i].PrivateKey().PublicKey().Bytes() - pj := accounts[j].PrivateKey().PublicKey().Bytes() - return bytes.Compare(pi, pj) == -1 + return accounts[i].PublicKey().Cmp(accounts[j].PublicKey()) == -1 }) go bc.Run()