Skip to content

Commit

Permalink
fix: ensure tx state != unstarted when attempts are returned (#10630)
Browse files Browse the repository at this point in the history
  • Loading branch information
aalu1418 authored Sep 13, 2023
1 parent 0887ddc commit 8826bb9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/web/evm_transfer_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/pkg/errors"

commontxmgr "github.com/smartcontractkit/chainlink/v2/common/txmgr"
"github.com/smartcontractkit/chainlink/v2/core/assets"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr"
Expand Down Expand Up @@ -146,7 +147,8 @@ func FindTxAttempt(ctx context.Context, timeout time.Duration, etx txmgr.Tx, Fin
}

// exit if tx attempts are found
if len(etx.TxAttempts) > 0 {
// also validate etx.State != unstarted (ensure proper tx state for tx with attempts)
if len(etx.TxAttempts) > 0 && etx.State != commontxmgr.TxUnstarted {
break
}
tick = time.After(recheckTime)
Expand Down

0 comments on commit 8826bb9

Please sign in to comment.