Skip to content

Commit

Permalink
More Comments for Monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
jik18001 committed Apr 25, 2022
1 parent a64f419 commit 2666eb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CTng/monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion CTng/monitor/monitor_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2666eb5

Please sign in to comment.