aboutsummaryrefslogtreecommitdiffstats
path: root/core/utils/nodeset-cache.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/utils/nodeset-cache.go')
-rw-r--r--core/utils/nodeset-cache.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/utils/nodeset-cache.go b/core/utils/nodeset-cache.go
index 0e616e4..6249665 100644
--- a/core/utils/nodeset-cache.go
+++ b/core/utils/nodeset-cache.go
@@ -223,13 +223,15 @@ func (cache *NodeSetCache) update(round uint64) (nIDs *sets, err error) {
return
}
nIDs = &sets{
- crs: crs,
- nodeSet: nodeSet,
- notarySet: make(map[types.NodeID]struct{}),
- dkgSet: nodeSet.GetSubSet(
- int(cfg.DKGSetSize), types.NewDKGSetTarget(crs)),
+ crs: crs,
+ nodeSet: nodeSet,
+ notarySet: make(map[types.NodeID]struct{}),
leaderNode: make(map[uint64]types.NodeID, cfg.RoundLength),
}
+ if round >= dkgDelayRound {
+ nIDs.dkgSet = nodeSet.GetSubSet(
+ int(cfg.DKGSetSize), types.NewDKGSetTarget(crs))
+ }
nIDs.notarySet = nodeSet.GetSubSet(
int(cfg.NotarySetSize), types.NewNotarySetTarget(crs))
cache.rounds[round] = nIDs