@@ -21,7 +21,9 @@ import (
2121)
2222
2323const (
24- gasBumpPercentage int = 20
24+ GasBumpPercentage int = 20
25+ // wait as much as 3 blocks time for the receipt
26+ SendAggregateResponseReceiptTimeout time.Duration = time .Second * 36
2527)
2628
2729type AvsWriter struct {
@@ -119,7 +121,7 @@ func (w *AvsWriter) SendAggregatedResponse(batchIdentifierHash [32]byte, batchMe
119121 return nil , fmt .Errorf ("transaction simulation failed: %v" , err )
120122 }
121123 }
122- txOpts .GasPrice = utils .CalculateGasPriceBumpBasedOnRetry (gasPrice , gasBumpPercentage , i )
124+ txOpts .GasPrice = utils .CalculateGasPriceBumpBasedOnRetry (gasPrice , GasBumpPercentage , i )
123125
124126 w .logger .Infof ("Sending ResponseToTask transaction with a gas price of %v" , txOpts .GasPrice )
125127 err = w .checkRespondToTaskFeeLimit (tx , txOpts , batchIdentifierHash , senderAddress )
@@ -137,7 +139,7 @@ func (w *AvsWriter) SendAggregatedResponse(batchIdentifierHash [32]byte, batchMe
137139 }
138140 }
139141
140- ctx , cancel := context .WithTimeout (context .Background (), time . Second * 36 )
142+ ctx , cancel := context .WithTimeout (context .Background (), SendAggregateResponseReceiptTimeout )
141143 defer cancel ()
142144 receipt , err := utils .WaitForTransactionReceipt (w .Client , ctx , tx .Hash ())
143145
0 commit comments