Skip to content

Commit

Permalink
fix(relayer): cancel waiting for receipts (#14019)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey authored Jun 20, 2023
1 parent ebcca68 commit c9fcffe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/relayer/message/process_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"math/big"
"strings"
"time"

"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
Expand Down Expand Up @@ -99,6 +100,10 @@ func (p *Processor) ProcessMessage(

relayer.EventsProcessed.Inc()

ctx, cancel := context.WithTimeout(ctx, 3*time.Minute)

defer cancel()

receipt, err := relayer.WaitReceipt(ctx, p.destEthClient, tx.Hash())
if err != nil {
return errors.Wrap(err, "relayer.WaitReceipt")
Expand Down

0 comments on commit c9fcffe

Please sign in to comment.