Skip to content

Commit 9d56887

Browse files
committed
chore: detail comments
1 parent 009375f commit 9d56887

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

aggregator/pkg/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ func (agg *Aggregator) ProcessOperatorSignedTaskResponseV2(signedTaskResponse *t
5959
agg.logger.Warn("Task not found in the internal map, might have been missed. Trying to fetch task data from Ethereum")
6060
batch, err := agg.avsReader.GetPendingBatchFromMerkleRoot(signedTaskResponse.BatchMerkleRoot, agg.AggregatorConfig.Aggregator.PendingBatchFetchBlockRange)
6161
if err != nil || batch == nil {
62-
agg.logger.Warnf("Pending task with merkle root 0x%x not found in logs", signedTaskResponse.BatchMerkleRoot)
62+
agg.logger.Warnf("Pending task with merkle root 0x%x not found in the contract", signedTaskResponse.BatchMerkleRoot)
6363
*reply = 1
64-
return nil
64+
return nil // TODO non urgent nice to have: return an error. With it, the Operator would know that his signature corresponded to a not found task
6565
}
6666
agg.logger.Info("Task was found in Ethereum, adding it to the internal map")
6767
agg.AddNewTask(batch.BatchMerkleRoot, batch.SenderAddress, batch.TaskCreatedBlock)

core/chainio/avs_reader.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func (r *AvsReader) GetPendingBatchFromMerkleRoot(merkleRoot [32]byte, blockRang
174174
}
175175

176176
if !logs.Next() {
177-
return nil, nil //Not an error, but no tasks found
177+
return nil, nil // Not an error, but no tasks found
178178
}
179179

180180
batch := logs.Event
@@ -188,7 +188,7 @@ func (r *AvsReader) GetPendingBatchFromMerkleRoot(merkleRoot [32]byte, blockRang
188188
}
189189

190190
if state.Responded {
191-
return nil, nil
191+
return nil, nil // Task found but already responded
192192
}
193193

194194
return batch, nil

0 commit comments

Comments
 (0)