From de055f27c7d739e2eb655f806c8971f3e256d8ba Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 20 Oct 2022 18:12:37 +0300 Subject: [PATCH] [#1942] neofs-adm: Fix multisig checks in tests Signed-off-by: Evgenii Stratonikov --- cmd/neofs-adm/internal/modules/morph/generate_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/neofs-adm/internal/modules/morph/generate_test.go b/cmd/neofs-adm/internal/modules/morph/generate_test.go index cf1c40c9..1e2e0c83 100644 --- a/cmd/neofs-adm/internal/modules/morph/generate_test.go +++ b/cmd/neofs-adm/internal/modules/morph/generate_test.go @@ -11,6 +11,7 @@ import ( "github.com/nspcc-dev/neo-go/cli/input" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" + "github.com/nspcc-dev/neo-go/pkg/smartcontract" "github.com/nspcc-dev/neo-go/pkg/wallet" "github.com/nspcc-dev/neofs-node/pkg/innerring" "github.com/spf13/viper" @@ -70,9 +71,9 @@ func TestGenerateAlphabet(t *testing.T) { require.NoError(t, err, "can't decrypt account") switch a.Label { case consensusAccountName: - require.Equal(t, size/2+1, len(a.Contract.Parameters)) + require.Equal(t, smartcontract.GetDefaultHonestNodeCount(size), len(a.Contract.Parameters)) case committeeAccountName: - require.Equal(t, size*2/3+1, len(a.Contract.Parameters)) + require.Equal(t, smartcontract.GetMajorityHonestNodeCount(size), len(a.Contract.Parameters)) default: require.Equal(t, singleAccountName, a.Label) }