@@ -377,10 +377,12 @@ func (s *subscriber) retryPendingReceipts(ctx context.Context) {
377377 currentPending .attempts ++
378378 if currentPending .attempts >= maxReceiptRetryAttempts {
379379 delete (s .pendingReceipts , txHash )
380- s .listener .log .Error ("Failed to fetch receipt after max retries" ,
380+ s .listener .log .Error (
381+ "Failed to fetch receipt after max retries" ,
381382 "txHash" , txHash .String (),
382383 "attempts" , currentPending .attempts ,
383- "error" , err )
384+ "error" , err ,
385+ )
384386 // TODO: perhaps we should close the subscription here as we failed
385387 // to deliver a receipt after many attempts?
386388 return
@@ -394,7 +396,8 @@ func (s *subscriber) retryPendingReceipts(ctx context.Context) {
394396 currentPending .nextRetryAt = time .Now ().Add (backoff )
395397 s .pendingReceipts [txHash ] = currentPending
396398
397- s .listener .log .Debug ("Receipt fetch failed, will retry" ,
399+ s .listener .log .Debug (
400+ "Receipt fetch failed, will retry" ,
398401 "txHash" , txHash .String (),
399402 "attempt" , currentPending .attempts ,
400403 "nextRetryIn" , backoff ,
@@ -429,9 +432,11 @@ func (s *subscriber) retryPendingReceipts(ctx context.Context) {
429432 // Send to subscriber
430433 s .ch .Send (p .receipt )
431434
432- s .listener .log .Info ("Successfully fetched receipt after retry" ,
435+ s .listener .log .Info (
436+ "Successfully fetched receipt after retry" ,
433437 "txHash" , txHash .String (),
434- "attempts" , currentPending .attempts )
438+ "attempts" , currentPending .attempts ,
439+ )
435440 }(pending )
436441 }
437442
0 commit comments