File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -939,13 +939,13 @@ func TestSendSignedTaskResponse(t *testing.T) {
939939
940940 agg , err := aggregator .NewAggregator (* aggregatorConfig )
941941 if err != nil {
942- fmt .Errorf ("Could not load aggregator %s" , err )
942+ t .Errorf ("Could not load aggregator %s" , err )
943943 }
944944 ctx , cancel := context .WithCancel (context .Background ())
945945 go func () {
946946 err = agg .Start (ctx )
947947 if err != nil {
948- fmt .Errorf ("Could not start Aggregator %s" , err )
948+ t .Errorf ("Could not start Aggregator %s" , err )
949949 }
950950 }()
951951
@@ -954,7 +954,7 @@ func TestSendSignedTaskResponse(t *testing.T) {
954954 // This is a mock to verify that a lost connection to the aggregator does not return anything.
955955 disconnected_rpcClient , err := operator .NewAggregatorRpcClient ("localhost:8999" , logger )
956956 if err != nil {
957- fmt .Errorf ("Could not create RPC client: %s. Is aggregator running?" , err )
957+ t .Errorf ("Could not create RPC client: %s. Is aggregator running?" , err )
958958 }
959959
960960 signedTaskResponse := & core_types.SignedTaskResponse {
Original file line number Diff line number Diff line change @@ -349,7 +349,10 @@ func (o *Operator) handleNewBatchLogV2(newBatchLog *servicemanager.ContractAlign
349349 hex .EncodeToString (signedTaskResponse .SenderAddress [:]),
350350 )
351351
352- o .aggRpcClient .SendSignedTaskResponseToAggregatorRetryable (& signedTaskResponse )
352+ _ , err = o .aggRpcClient .SendSignedTaskResponseToAggregatorRetryable (& signedTaskResponse )
353+ if err != nil {
354+ o .Logger .Infof ("Failed to send signed task response %x to Aggregator. Err: %v" , signedTaskResponse .BatchMerkleRoot , err )
355+ }
353356}
354357func (o * Operator ) ProcessNewBatchLogV2 (newBatchLog * servicemanager.ContractAlignedLayerServiceManagerNewBatchV2 ) error {
355358
@@ -430,7 +433,10 @@ func (o *Operator) handleNewBatchLogV3(newBatchLog *servicemanager.ContractAlign
430433 hex .EncodeToString (signedTaskResponse .SenderAddress [:]),
431434 )
432435
433- o .aggRpcClient .SendSignedTaskResponseToAggregatorRetryable (& signedTaskResponse )
436+ _ , err = o .aggRpcClient .SendSignedTaskResponseToAggregatorRetryable (& signedTaskResponse )
437+ if err != nil {
438+ o .Logger .Infof ("Failed to send signed task response %x to Aggregator. Err: %v" , signedTaskResponse .BatchMerkleRoot , err )
439+ }
434440}
435441func (o * Operator ) ProcessNewBatchLogV3 (newBatchLog * servicemanager.ContractAlignedLayerServiceManagerNewBatchV3 ) error {
436442
You can’t perform that action at this time.
0 commit comments