File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -727,6 +727,8 @@ func (l2 *L2) observerProbes(_ context.Context, o otelapi.Observer) error {
727727func (l2 * L2 ) sendProbeTx (ctx context.Context ) {
728728 l := logutils .LoggerFromContext (ctx )
729729
730+ start := time .Now ()
731+
730732 var (
731733 data = make ([]byte , 8 )
732734 gasPrice * big.Int
@@ -768,6 +770,10 @@ func (l2 *L2) sendProbeTx(ctx context.Context) {
768770
769771tryingNonces:
770772 for attempt := 1 ; attempt <= 8 ; attempt ++ { // we don't want to get rate-limited
773+ if attempt > 1 && time .Since (start ) > 500 * time .Millisecond {
774+ return
775+ }
776+
771777 thisBlock := time .Now ().Add (- l2 .cfg .BlockTime / 2 ).Round (l2 .cfg .BlockTime )
772778 binary .BigEndian .PutUint64 (data , uint64 (thisBlock .Unix ()))
773779
@@ -863,7 +869,7 @@ func (l2 *L2) checkAndResetProbeTxNonce(ctx context.Context) {
863869 if inFlight > l2 .cfg .ProbeTx .ResetThreshold {
864870 l .Warn ("In-flight probe transaction count is above threshold, resetting the nonce" ,
865871 zap .Int64 ("count" , inFlight ),
866- zap .Int64 ("threshold" , l2 .monitorProbesLandedCount ),
872+ zap .Int64 ("threshold" , l2 .cfg . ProbeTx . ResetThreshold ),
867873 )
868874
869875 l2 .monitorNonce = 0
You can’t perform that action at this time.
0 commit comments