From 2666eb5efdfc3a181b7a082366be35c4f89ce5be Mon Sep 17 00:00:00 2001 From: Jie Date: Mon, 25 Apr 2022 19:23:15 -0400 Subject: [PATCH] More Comments for Monitor --- CTng/monitor/monitor.go | 6 +++++- CTng/monitor/monitor_process.go | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CTng/monitor/monitor.go b/CTng/monitor/monitor.go index f5c1660..c7b3bde 100644 --- a/CTng/monitor/monitor.go +++ b/CTng/monitor/monitor.go @@ -86,8 +86,10 @@ func QueryAuthorities(c *MonitorContext) { } +//Written by Jie +//This function accuses the entity if the damain name is provided +//It is called when the gossip object received is not valid, or the monitor didn't get response when querying the logger or the CA //Accused = Domain name of the accused entity (logger etc.) -//should be a monitor functionality func AccuseEntity(c *MonitorContext, Accused string) { // this should be a method for the monitor // verify we havent accused during this MMD @@ -119,6 +121,8 @@ func AccuseEntity(c *MonitorContext, Accused string) { Send_to_gossiper(c, accusation) } +//Written by Jie +//Send the input gossip object to its gossiper func Send_to_gossiper(c *MonitorContext, g gossip.Gossip_object) { // Convert gossip object to JSON msg, err := json.Marshal(g) diff --git a/CTng/monitor/monitor_process.go b/CTng/monitor/monitor_process.go index 51afe81..be9534e 100644 --- a/CTng/monitor/monitor_process.go +++ b/CTng/monitor/monitor_process.go @@ -7,7 +7,9 @@ import ( "time" ) -//Need to discuss about this ****************************************************** +//Written by Jie, reviewed by Finn +//This function is called by handle_gossip in monitor_server.go under the server folder +//It will be called if the gossip object is validated func Process_valid_object(c *MonitorContext, g gossip.Gossip_object) { //if the valid object is from the logger in the monitor config logger URL list //This handles the STHS