Skip to content

Commit

Permalink
Deprecate DualBroadcastDetection
Browse files Browse the repository at this point in the history
  • Loading branch information
dimriou committed Jan 9, 2025
1 parent 03d5973 commit ab62c24
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions core/chains/evm/txm/stuck_tx_detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ func (s *stuckTxDetector) DetectStuckTransaction(ctx context.Context, tx *types.
//nolint:gocritic //placeholder for upcoming chaintypes
switch s.chainType {
default:
if s.config.DualBroadcast {
result, err := s.dualBroadcastDetection(ctx, tx)
if result || err != nil {
return result, err
}
}
return s.timeBasedDetection(tx), nil
}
}
Expand Down Expand Up @@ -85,7 +79,9 @@ const (
APIStatusUnknown = "UNKNOWN"
)

func (s *stuckTxDetector) dualBroadcastDetection(ctx context.Context, tx *types.Transaction) (bool, error) {
// Deprecated: DualBroadcastDetection doesn't provide any significant benefits in terms of speed and time
// based detection can replace it.
func (s *stuckTxDetector) DualBroadcastDetection(ctx context.Context, tx *types.Transaction) (bool, error) {
for _, attempt := range tx.Attempts {
req, err := http.NewRequestWithContext(ctx, http.MethodGet, s.config.DetectionURL+attempt.Hash.String(), nil)
if err != nil {
Expand Down

0 comments on commit ab62c24

Please sign in to comment.