diff --git a/node/node.go b/node/node.go index e400f4a2d..b2ce4b5ef 100644 --- a/node/node.go +++ b/node/node.go @@ -374,11 +374,11 @@ func (node *Node) AddPeers(peers []*p2p.Peer) int { // Only leader needs to add the peer info into consensus // Validators will receive the updated peer info from Leader via pong message // TODO: remove this after fully migrating to beacon chain-based committee membership - if count > 0 && node.NodeConfig.IsLeader() { - node.Consensus.AddPeers(peers) - // TODO: make peers into a context object shared by consensus and drand - node.DRand.AddPeers(peers) - } + //if count > 0 && node.NodeConfig.IsLeader() { + // node.Consensus.AddPeers(peers) + // // TODO: make peers into a context object shared by consensus and drand + // node.DRand.AddPeers(peers) + //} return count } diff --git a/node/node_handler.go b/node/node_handler.go index c8044daef..217989f3b 100644 --- a/node/node_handler.go +++ b/node/node_handler.go @@ -501,18 +501,18 @@ func (node *Node) pongMessageHandler(msgPayload []byte) int { // otherwise, we may not be able to validate the consensus messages received // which will result in first consensus timeout // TODO: remove this after fully migrating to beacon chain-based committee membership - err = node.Consensus.SetLeaderPubKey(pong.LeaderPubKey) - if err != nil { - utils.GetLogInstance().Error("Unmarshal Consensus Leader PubKey Failed", "error", err) - } else { - utils.GetLogInstance().Info("Set Consensus Leader PubKey", "key", node.Consensus.GetLeaderPubKey()) - } - err = node.DRand.SetLeaderPubKey(pong.LeaderPubKey) - if err != nil { - utils.GetLogInstance().Error("Unmarshal DRand Leader PubKey Failed", "error", err) - } else { - utils.GetLogInstance().Info("Set DRand Leader PubKey", "key", node.Consensus.GetLeaderPubKey()) - } + //err = node.Consensus.SetLeaderPubKey(pong.LeaderPubKey) + //if err != nil { + // utils.GetLogInstance().Error("Unmarshal Consensus Leader PubKey Failed", "error", err) + //} else { + // utils.GetLogInstance().Info("Set Consensus Leader PubKey", "key", node.Consensus.GetLeaderPubKey()) + //} + //err = node.DRand.SetLeaderPubKey(pong.LeaderPubKey) + //if err != nil { + // utils.GetLogInstance().Error("Unmarshal DRand Leader PubKey Failed", "error", err) + //} else { + // utils.GetLogInstance().Info("Set DRand Leader PubKey", "key", node.Consensus.GetLeaderPubKey()) + //} peers := make([]*p2p.Peer, 0) @@ -564,7 +564,8 @@ func (node *Node) pongMessageHandler(msgPayload []byte) int { node.serviceManager.TakeAction(&service.Action{Action: service.Notify, ServiceType: service.PeerDiscovery, Params: data}) // TODO: remove this after fully migrating to beacon chain-based committee membership - return node.Consensus.UpdatePublicKeys(publicKeys) + node.DRand.UpdatePublicKeys(publicKeys) + // return node.Consensus.UpdatePublicKeys(publicKeys) + node.DRand.UpdatePublicKeys(publicKeys) + return 0 } func (node *Node) epochShardStateMessageHandler(msgPayload []byte) int {