Skip to content

Commit

Permalink
inline documenting
Browse files Browse the repository at this point in the history
  • Loading branch information
jdutchak committed Jul 16, 2024
1 parent 68323ce commit fa37b7a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/workers/workers.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,14 @@ func MonitorWorkers(ctx context.Context, node *masa.OracleNode) {
}
}

/**
* Processes the validator data received from the network.
*
* @param {pubsub2.Message} data - The message data received from the network.
* @param {map[string]interface{}} validatorDataMap - The map containing validator data.
* @param {time.Time} startTime - The start time of the work.
* @param {masa.OracleNode} node - The OracleNode instance.
*/
func processValidatorData(data *pubsub2.Message, validatorDataMap map[string]interface{}, startTime *time.Time, node *masa.OracleNode) {
if response, ok := validatorDataMap["Response"].(map[string]interface{}); ok {
if _, ok := response["error"].(string); ok {
Expand All @@ -473,6 +481,14 @@ func processValidatorData(data *pubsub2.Message, validatorDataMap map[string]int
}
}

/**
* Processes the work received from the network.
*
* @param {pubsub2.Message} data - The message data received from the network.
* @param {string} work - The work data as a string.
* @param {time.Time} startTime - The start time of the work.
* @param {masa.OracleNode} node - The OracleNode instance.
*/
func processWork(data *pubsub2.Message, work string, startTime *time.Time, node *masa.OracleNode) {
key, _ := computeCid(work)
logrus.Infof("[+] Work done %s", key)
Expand Down

0 comments on commit fa37b7a

Please sign in to comment.