From 4ab97094c2c26d9fd9b94720e49892f0055aa357 Mon Sep 17 00:00:00 2001 From: Evgeniy Stratonikov Date: Fri, 3 Dec 2021 16:37:09 +0300 Subject: [PATCH] neotest: provide full account list for committee Make the behaviour of `committee.Single(n)` more predictable, i.e be able to return every committee member. Signed-off-by: Evgeniy Stratonikov --- pkg/neotest/chain/chain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/neotest/chain/chain.go b/pkg/neotest/chain/chain.go index 53ca25f71..7eaa5bd9c 100644 --- a/pkg/neotest/chain/chain.go +++ b/pkg/neotest/chain/chain.go @@ -72,7 +72,7 @@ func init() { standByCommittee[4] = hex.EncodeToString(pubs[4].Bytes()) standByCommittee[5] = hex.EncodeToString(pubs[5].Bytes()) - multiValidatorAcc = make([]*wallet.Account, mv) + multiValidatorAcc = make([]*wallet.Account, 4) sort.Sort(pubs[:4]) sort.Slice(accs[:4], func(i, j int) bool { @@ -88,7 +88,7 @@ func init() { } } - multiCommitteeAcc = make([]*wallet.Account, mc) + multiCommitteeAcc = make([]*wallet.Account, len(committeeWIFs)) sort.Sort(pubs) sort.Slice(accs, func(i, j int) bool {