diff --git a/core/chains/evm/txm/txm.go b/core/chains/evm/txm/txm.go index 1c0cca07b76..c37099d3783 100644 --- a/core/chains/evm/txm/txm.go +++ b/core/chains/evm/txm/txm.go @@ -25,7 +25,7 @@ const ( maxInFlightSubset int = 3 maxAllowedAttempts uint16 = 10 pendingNonceDefaultTimeout time.Duration = 30 * time.Second - pendingNonceRecheckInterval time.Duration = 2 * time.Second + pendingNonceRecheckInterval time.Duration = 1 * time.Second ) type Client interface { diff --git a/core/chains/evm/txm/txm_test.go b/core/chains/evm/txm/txm_test.go index 22f700d13e6..fef90f9c344 100644 --- a/core/chains/evm/txm/txm_test.go +++ b/core/chains/evm/txm/txm_test.go @@ -35,11 +35,10 @@ func TestLifecycle(t *testing.T) { keystore := mocks.NewKeystore(t) t.Run("retries if initial pending nonce call fails", func(t *testing.T) { + lggr, observedLogs := logger.TestObserved(t, zap.DebugLevel) config := Config{BlockTime: 1 * time.Minute} - txStore := mocks.NewTxStore(t) - txStore.On("FetchUnconfirmedTransactionAtNonceWithCount", mock.Anything, mock.Anything, mock.Anything).Return(nil, 20, nil) + txStore := storage.NewInMemoryStoreManager(lggr, testutils.FixtureChainID) keystore.On("EnabledAddressesForChain", mock.Anything, mock.Anything).Return([]common.Address{address1}, nil).Once() - lggr, observedLogs := logger.TestObserved(t, zap.DebugLevel) txm := NewTxm(lggr, testutils.FixtureChainID, client, nil, txStore, nil, config, keystore) client.On("PendingNonceAt", mock.Anything, address1).Return(uint64(0), errors.New("error")).Once() client.On("PendingNonceAt", mock.Anything, address1).Return(uint64(0), nil).Once()