@@ -29,6 +29,7 @@ import (
2929 "github.com/smartcontractkit/chainlink-common/pkg/sqlutil"
3030 commonutils "github.com/smartcontractkit/chainlink-common/pkg/utils"
3131 "github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
32+ "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr/txmgrtest"
3233
3334 "github.com/smartcontractkit/chainlink-framework/chains/fees"
3435 txmgrcommon "github.com/smartcontractkit/chainlink-framework/chains/txmgr"
@@ -49,7 +50,6 @@ import (
4950 "github.com/smartcontractkit/chainlink-evm/pkg/testutils"
5051 evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types"
5152 "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr"
52- "github.com/smartcontractkit/chainlink/v2/core/internal/cltest"
5353)
5454
5555var dbListenerCfg txmgr.ListenerConfig = testListenerConfig {}
@@ -100,7 +100,7 @@ func NewTestEthBroadcaster(
100100
101101func TestEthBroadcaster_Lifecycle (t * testing.T ) {
102102 db := testutils .NewIndependentSqlxDB (t )
103- txStore := cltest .NewTestTxStore (t , db )
103+ txStore := txmgrtest .NewTestTxStore (t , db )
104104 evmcfg := configtest .NewChainScopedConfig (t , nil )
105105 ethClient := clienttest .NewClientWithDefaultChainID (t )
106106 memKS := keystest .NewMemoryChainStore ()
@@ -163,7 +163,7 @@ func TestEthBroadcaster_Lifecycle(t *testing.T) {
163163// Failure to load next sequnce map should not fail Broadcaster startup
164164func TestEthBroadcaster_LoadNextSequenceMapFailure_StartupSuccess (t * testing.T ) {
165165 db := testutils .NewSqlxDB (t )
166- txStore := cltest .NewTestTxStore (t , db )
166+ txStore := txmgrtest .NewTestTxStore (t , db )
167167 evmcfg := configtest .NewChainScopedConfig (t , nil )
168168 ethClient := clienttest .NewClientWithDefaultChainID (t )
169169 memKS := keystest .NewMemoryChainStore ()
@@ -201,7 +201,7 @@ func TestEthBroadcaster_LoadNextSequenceMapFailure_StartupSuccess(t *testing.T)
201201func TestEthBroadcaster_ProcessUnstartedEthTxs_Success (t * testing.T ) {
202202 db := testutils .NewSqlxDB (t )
203203 ctx := t .Context ()
204- txStore := cltest .NewTestTxStore (t , db )
204+ txStore := txmgrtest .NewTestTxStore (t , db )
205205
206206 memKS := keystest .NewMemoryChainStore ()
207207 fromAddress := memKS .MustCreate (t )
@@ -574,7 +574,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) {
574574func TestEthBroadcaster_TransmitChecking (t * testing.T ) {
575575 db := testutils .NewSqlxDB (t )
576576 ctx := t .Context ()
577- txStore := cltest .NewTestTxStore (t , db )
577+ txStore := txmgrtest .NewTestTxStore (t , db )
578578 memKS := keystest .NewMemoryChainStore ()
579579 fromAddress := memKS .MustCreate (t )
580580 ethClient := clienttest .NewClientWithDefaultChainID (t )
@@ -657,7 +657,7 @@ func TestEthBroadcaster_TransmitChecking(t *testing.T) {
657657func TestEthBroadcaster_ProcessUnstartedEthTxs_OptimisticLockingOnEthTx (t * testing.T ) {
658658 // non-transactional DB needed because we deliberately test for FK violation
659659 db := testutils .NewIndependentSqlxDB (t )
660- txStore := cltest .NewTestTxStore (t , db )
660+ txStore := txmgrtest .NewTestTxStore (t , db )
661661 ccfg := configtest .NewChainScopedConfig (t , nil )
662662 evmcfg := txmgr .NewEvmTxmConfig (ccfg .EVM ())
663663 ethClient := clienttest .NewClientWithDefaultChainID (t )
@@ -722,7 +722,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_OptimisticLockingOnEthTx(t *testi
722722
723723func TestEthBroadcaster_ProcessUnstartedEthTxs_Success_WithMultiplier (t * testing.T ) {
724724 db := testutils .NewSqlxDB (t )
725- txStore := cltest .NewTestTxStore (t , db )
725+ txStore := txmgrtest .NewTestTxStore (t , db )
726726
727727 memKS := keystest .NewMemoryChainStore ()
728728 fromAddress := memKS .MustCreate (t )
@@ -774,7 +774,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) {
774774
775775 t .Run ("cannot be more than one transaction per address in an unfinished state" , func (t * testing.T ) {
776776 db := testutils .NewSqlxDB (t )
777- txStore := cltest .NewTestTxStore (t , db )
777+ txStore := txmgrtest .NewTestTxStore (t , db )
778778 fromAddress := testutils .NewAddress ()
779779
780780 firstInProgress := txmgr.Tx {
@@ -807,7 +807,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) {
807807
808808 t .Run ("previous run assigned nonce but never broadcast" , func (t * testing.T ) {
809809 db := testutils .NewSqlxDB (t )
810- txStore := cltest .NewTestTxStore (t , db )
810+ txStore := txmgrtest .NewTestTxStore (t , db )
811811 evmcfg := configtest .NewChainScopedConfig (t , nil )
812812 memKS := keystest .NewMemoryChainStore ()
813813 fromAddress := memKS .MustCreate (t )
@@ -847,7 +847,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) {
847847
848848 t .Run ("previous run assigned nonce and broadcast but it fatally errored before we could save" , func (t * testing.T ) {
849849 db := testutils .NewSqlxDB (t )
850- txStore := cltest .NewTestTxStore (t , db )
850+ txStore := txmgrtest .NewTestTxStore (t , db )
851851 evmcfg := configtest .NewChainScopedConfig (t , nil )
852852 memKS := keystest .NewMemoryChainStore ()
853853 fromAddress := memKS .MustCreate (t )
@@ -885,7 +885,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) {
885885
886886 t .Run ("previous run assigned nonce and broadcast and is now in mempool" , func (t * testing.T ) {
887887 db := testutils .NewSqlxDB (t )
888- txStore := cltest .NewTestTxStore (t , db )
888+ txStore := txmgrtest .NewTestTxStore (t , db )
889889 evmcfg := configtest .NewChainScopedConfig (t , nil )
890890 memKS := keystest .NewMemoryChainStore ()
891891 fromAddress := memKS .MustCreate (t )
@@ -922,7 +922,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) {
922922
923923 t .Run ("previous run assigned nonce and broadcast and now the transaction has been confirmed" , func (t * testing.T ) {
924924 db := testutils .NewSqlxDB (t )
925- txStore := cltest .NewTestTxStore (t , db )
925+ txStore := txmgrtest .NewTestTxStore (t , db )
926926 evmcfg := configtest .NewChainScopedConfig (t , nil )
927927 memKS := keystest .NewMemoryChainStore ()
928928 fromAddress := memKS .MustCreate (t )
@@ -960,7 +960,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) {
960960 t .Run ("previous run assigned nonce and then failed to reach node for some reason and node is still down" , func (t * testing.T ) {
961961 failedToReachNodeError := context .DeadlineExceeded
962962 db := testutils .NewSqlxDB (t )
963- txStore := cltest .NewTestTxStore (t , db )
963+ txStore := txmgrtest .NewTestTxStore (t , db )
964964 evmcfg := configtest .NewChainScopedConfig (t , nil )
965965 memKS := keystest .NewMemoryChainStore ()
966966 fromAddress := memKS .MustCreate (t )
@@ -997,7 +997,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) {
997997
998998 t .Run ("previous run assigned nonce and broadcast transaction then crashed and rebooted with a different configured gas price" , func (t * testing.T ) {
999999 db := testutils .NewSqlxDB (t )
1000- txStore := cltest .NewTestTxStore (t , db )
1000+ txStore := txmgrtest .NewTestTxStore (t , db )
10011001
10021002 memKS := keystest .NewMemoryChainStore ()
10031003 fromAddress := memKS .MustCreate (t )
@@ -1065,7 +1065,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) {
10651065 encodedPayload := []byte {0 , 1 }
10661066
10671067 db := testutils .NewSqlxDB (t )
1068- txStore := cltest .NewTestTxStore (t , db )
1068+ txStore := txmgrtest .NewTestTxStore (t , db )
10691069
10701070 memKS := keystest .NewMemoryChainStore ()
10711071 fromAddress := memKS .MustCreate (t )
@@ -1692,7 +1692,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_GasEstimationError(t *testing.T)
16921692 encodedPayload := []byte {0 , 1 }
16931693
16941694 db := testutils .NewSqlxDB (t )
1695- txStore := cltest .NewTestTxStore (t , db )
1695+ txStore := txmgrtest .NewTestTxStore (t , db )
16961696
16971697 memKS := keystest .NewMemoryChainStore ()
16981698 fromAddress := memKS .MustCreate (t )
@@ -1763,7 +1763,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_KeystoreErrors(t *testing.T) {
17631763 localNonce := 0
17641764
17651765 db := testutils .NewSqlxDB (t )
1766- txStore := cltest .NewTestTxStore (t , db )
1766+ txStore := txmgrtest .NewTestTxStore (t , db )
17671767
17681768 fromAddress := keystest .NewMemoryChainStore ().MustCreate (t )
17691769 kst := & keystest.FakeChainStore {
@@ -1814,7 +1814,7 @@ func TestEthBroadcaster_Trigger(t *testing.T) {
18141814 // Simple sanity check to make sure it doesn't block
18151815 db := testutils .NewSqlxDB (t )
18161816
1817- txStore := cltest .NewTestTxStore (t , db )
1817+ txStore := txmgrtest .NewTestTxStore (t , db )
18181818 evmcfg := configtest .NewChainScopedConfig (t , nil )
18191819 ethKeyStore := & keystest.FakeChainStore {}
18201820 ethClient := clienttest .NewClientWithDefaultChainID (t )
@@ -1836,7 +1836,7 @@ func TestEthBroadcaster_SyncNonce(t *testing.T) {
18361836 c .NonceAutoSync = ptr (true )
18371837 })
18381838 evmTxmCfg := txmgr .NewEvmTxmConfig (evmcfg .EVM ())
1839- txStore := cltest .NewTestTxStore (t , db )
1839+ txStore := txmgrtest .NewTestTxStore (t , db )
18401840
18411841 memKS := keystest .NewMemoryChainStore ()
18421842 fromAddress := memKS .MustCreate (t )
@@ -1871,7 +1871,7 @@ func TestEthBroadcaster_NonceTracker_InProgressTx(t *testing.T) {
18711871 t .Parallel ()
18721872
18731873 db := testutils .NewSqlxDB (t )
1874- txStore := cltest .NewTestTxStore (t , db )
1874+ txStore := txmgrtest .NewTestTxStore (t , db )
18751875 memKS := keystest .NewMemoryChainStore ()
18761876 fromAddress := memKS .MustCreate (t )
18771877 ethKeyStore := keys .NewChainStore (memKS , big .NewInt (0 ))
@@ -1910,7 +1910,7 @@ func TestEthBroadcaster_HederaBroadcastValidation(t *testing.T) {
19101910 t .Parallel ()
19111911
19121912 db := testutils .NewSqlxDB (t )
1913- txStore := cltest .NewTestTxStore (t , db )
1913+ txStore := txmgrtest .NewTestTxStore (t , db )
19141914 memKS := keystest .NewMemoryChainStore ()
19151915 ethKeyStore := keys .NewChainStore (memKS , big .NewInt (0 ))
19161916 evmcfg := configtest .NewChainScopedConfig (t , nil )
0 commit comments