From 8826bb923f6feb16eef93831bca99ee6f90a6bc3 Mon Sep 17 00:00:00 2001 From: Aaron Lu <50029043+aalu1418@users.noreply.github.com> Date: Wed, 13 Sep 2023 15:23:03 -0600 Subject: [PATCH] fix: ensure tx state != unstarted when attempts are returned (#10630) --- core/web/evm_transfer_controller.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/web/evm_transfer_controller.go b/core/web/evm_transfer_controller.go index 675d978e35f..69d55b54bba 100644 --- a/core/web/evm_transfer_controller.go +++ b/core/web/evm_transfer_controller.go @@ -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" @@ -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)