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