Skip to content

Commit

Permalink
core/chains/evm/txmgr: fix TestTxm_Reset mocks (#11420)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 authored Nov 30, 2023
1 parent b8199c5 commit 7e83c34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions core/chains/evm/txmgr/broadcaster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ func TestEthBroadcaster_LoadNextSequenceMapFailure_StartupSuccess(t *testing.T)
// Instance starts without error even if loading next sequence map fails
err := eb.Start(testutils.Context(t))
require.NoError(t, err)
t.Cleanup(func() { assert.NoError(t, eb.Close()) })
}

func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions core/chains/evm/txmgr/txmgr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ func TestTxm_Reset(t *testing.T) {
ethClient := evmtest.NewEthClientMockWithDefaultChain(t)
ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(nil, nil)
ethClient.On("BatchCallContextAll", mock.Anything, mock.Anything).Return(nil).Maybe()
ethClient.On("PendingSequenceAt", mock.Anything, addr).Return(128, nil).Maybe()
ethClient.On("PendingSequenceAt", mock.Anything, addr2).Return(44, nil).Maybe()
ethClient.On("PendingNonceAt", mock.Anything, addr).Return(uint64(128), nil).Maybe()
ethClient.On("PendingNonceAt", mock.Anything, addr2).Return(uint64(44), nil).Maybe()

estimator := gas.NewEstimator(logger.Test(t), ethClient, cfg.EVM(), cfg.EVM().GasEstimator())
txm, err := makeTestEvmTxm(t, db, ethClient, estimator, cfg.EVM(), cfg.EVM().GasEstimator(), cfg.EVM().Transactions(), cfg.Database(), cfg.Database().Listener(), kst.Eth())
Expand Down

0 comments on commit 7e83c34

Please sign in to comment.