From 7db51f0ab52a77bb29d840396654d840be19cc2a Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Fri, 21 Dec 2018 22:44:15 +0000 Subject: [PATCH] add additional debug info to beacon node Signed-off-by: Leo Chen --- beaconchain/libs/beaconchain.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beaconchain/libs/beaconchain.go b/beaconchain/libs/beaconchain.go index be253925b..8e61663cc 100644 --- a/beaconchain/libs/beaconchain.go +++ b/beaconchain/libs/beaconchain.go @@ -92,7 +92,7 @@ func generateBCKey() kyber.Point { //AcceptConnections welcomes new connections func (bc *BeaconChain) AcceptConnections(b []byte) { Node := bcconn.DeserializeNodeInfo(b) - bc.log.Info("Obtained node information, updating local information") + bc.log.Info("New Node Connection", "IP", Node.Self.IP, "Port", Node.Self.Port) bc.NumberOfNodesAdded = bc.NumberOfNodesAdded + 1 _, isLeader := utils.AllocateShard(bc.NumberOfNodesAdded, bc.NumberOfShards) if isLeader { @@ -101,6 +101,7 @@ func (bc *BeaconChain) AcceptConnections(b []byte) { response := bcconn.ResponseRandomNumber{NumberOfShards: bc.NumberOfShards, NumberOfNodesAdded: bc.NumberOfNodesAdded, Leaders: bc.Leaders} msg := bcconn.SerializeRandomInfo(response) msgToSend := proto_identity.ConstructIdentityMessage(proto_identity.Acknowledge, msg) + bc.log.Info("Sent Out Msg", "# Nodes", response.NumberOfNodesAdded) host.SendMessage(bc.host, Node.Self, msgToSend, nil) }