aboutsummaryrefslogtreecommitdiffstats
path: root/core/utils/nodeset-cache.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-03-20 14:57:12 +0800
committerJimmy Hu <jimmy.hu@dexon.org>2019-03-27 15:25:10 +0800
commit6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7 (patch)
tree2c18fe616f84df7274f19f88cf325fe558869918 /core/utils/nodeset-cache.go
parentfa3b5a29499739e90b3cf17f9a0cf60a72a64fc0 (diff)
downloaddexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.tar
dexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.tar.gz
dexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.tar.bz2
dexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.tar.lz
dexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.tar.xz
dexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.tar.zst
dexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.zip
core: merge notarySet and DKGSet (#488)
* core: さよăȘら DKGSet * test logger * temporary fix before finalized * core: Sign psig on commit vote * Add syncer log * fixup
Diffstat (limited to 'core/utils/nodeset-cache.go')
-rw-r--r--core/utils/nodeset-cache.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/core/utils/nodeset-cache.go b/core/utils/nodeset-cache.go
index 0090123..89ebd24 100644
--- a/core/utils/nodeset-cache.go
+++ b/core/utils/nodeset-cache.go
@@ -39,7 +39,6 @@ type sets struct {
crs common.Hash
nodeSet *types.NodeSet
notarySet map[types.NodeID]struct{}
- dkgSet map[types.NodeID]struct{}
leaderNode map[uint64]types.NodeID
}
@@ -134,16 +133,6 @@ func (cache *NodeSetCache) GetNotarySet(
return cache.cloneMap(IDs.notarySet), nil
}
-// GetDKGSet returns of DKG set of this round.
-func (cache *NodeSetCache) GetDKGSet(
- round uint64) (map[types.NodeID]struct{}, error) {
- IDs, err := cache.getOrUpdate(round)
- if err != nil {
- return nil, err
- }
- return cache.cloneMap(IDs.dkgSet), nil
-}
-
// GetLeaderNode returns the BA leader of the position.
func (cache *NodeSetCache) GetLeaderNode(pos types.Position) (
types.NodeID, error) {
@@ -254,10 +243,6 @@ func (cache *NodeSetCache) update(round uint64) (nIDs *sets, err error) {
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