From 56466020ff86a80d7af28438e5e52e0ead599de8 Mon Sep 17 00:00:00 2001
From: benjamin <ben@elixxir.io>
Date: Fri, 14 Oct 2022 09:23:07 -0700
Subject: [PATCH] removed the host pool hack and made the code probe the known
 rounds via prints

---
 cmix/follow.go           | 2 +-
 cmix/gateway/hostPool.go | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/cmix/follow.go b/cmix/follow.go
index 25a266081..5d1764994 100644
--- a/cmix/follow.go
+++ b/cmix/follow.go
@@ -358,7 +358,7 @@ func (c *client) follow(identity receptionID.IdentityUse,
 		if !hasMessage && c.verboseRounds != nil {
 			c.verboseRounds.denote(rid, RoundState(NoMessageAvailable))
 		}
-		//jww.INFO.Printf("[LOOKUP] round %d checked for %d, has message: %s", rid, identity.EphId.Int64(), hasMessage)
+		jww.INFO.Printf("[LOOKUP] round %d checked for %d, has message: %b", rid, identity.EphId.Int64(), hasMessage)
 		return hasMessage
 	}
 
diff --git a/cmix/gateway/hostPool.go b/cmix/gateway/hostPool.go
index 0bf9d5a92..c37dbdf2f 100644
--- a/cmix/gateway/hostPool.go
+++ b/cmix/gateway/hostPool.go
@@ -14,6 +14,7 @@ package gateway
 
 import (
 	"encoding/json"
+	"math"
 	"sort"
 	"strings"
 	"sync"
@@ -822,10 +823,7 @@ func getPoolSize(ndfLen, maxSize uint32) (uint32, error) {
 			"Unable to create HostPool: no gateways available")
 	}
 
-	// fix-me: this is a HACK to get it working in testnet night of 10/12/2022
-	// DO NOT PUSH TO LIVE - gateway gossip shuffle must be fixed
-	//poolSize := uint32(math.Ceil(math.Sqrt(float64(ndfLen))))
-	poolSize := ndfLen
+	poolSize := uint32(math.Ceil(math.Sqrt(float64(ndfLen))))
 	if poolSize > maxSize {
 		return maxSize, nil
 	}
-- 
GitLab