diff --git a/cmd/propose.go b/cmd/propose.go index f0f6a48f..60b9cb42 100644 --- a/cmd/propose.go +++ b/cmd/propose.go @@ -227,7 +227,7 @@ func (*UtilsStruct) GetBiggestStakeAndId(client *ethclient.Client, address strin biggestStakerId uint32 mu sync.Mutex wg sync.WaitGroup - errChan = make(chan error, 1) + errChan = make(chan error, numberOfStakers) ) log.Debug("Iterating over all the stakers...") diff --git a/cmd/propose_test.go b/cmd/propose_test.go index a80c6b3d..b04d27ca 100644 --- a/cmd/propose_test.go +++ b/cmd/propose_test.go @@ -605,7 +605,7 @@ func TestGetBiggestStakeAndId(t *testing.T) { { name: "Test 1: When GetBiggestStakeAndId function executes successfully", args: args{ - numOfStakers: 2, + numOfStakers: 1, remainingTime: 10, stake: big.NewInt(1).Mul(big.NewInt(5326), big.NewInt(1e18)), },