Skip to content

Commit 25cd759

Browse files
committed
adding test fixes and pr review feedback
1 parent 865b89f commit 25cd759

File tree

16 files changed

+55
-8
lines changed

16 files changed

+55
-8
lines changed

core/scripts/go.sum

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,7 @@ github.com/smartcontractkit/chainlink-deployments-framework v0.12.1/go.mod h1:mx
12921292
<<<<<<< HEAD
12931293
<<<<<<< HEAD
12941294
<<<<<<< HEAD
1295+
<<<<<<< HEAD
12951296
>>>>>>> 7c7519f15a (go mod fixes)
12961297
github.com/smartcontractkit/chainlink-evm v0.0.0-20250618173856-d731d7e7468e h1:QBua0Vz42fC3nwzGnaAcUwTp+EnJp5sqiUDjud1UnwE=
12971298
github.com/smartcontractkit/chainlink-evm v0.0.0-20250618173856-d731d7e7468e/go.mod h1:GlSY0cLuXOdaZP8+7pQTezPUwJBW+ExMb5CGby4GGSU=
@@ -1303,6 +1304,10 @@ github.com/smartcontractkit/chainlink-evm v0.0.0-20250619153213-197845c3124d/go.
13031304
github.com/smartcontractkit/chainlink-evm v0.0.0-20250623144418-c3f7dadd73a4 h1:3VskLKO8iVkug1bXz3jG4majt41Mp6PYGJDxQ/nYAFY=
13041305
github.com/smartcontractkit/chainlink-evm v0.0.0-20250623144418-c3f7dadd73a4/go.mod h1:8ngexcwhlWHLsRSQP7XGyNF5hYDUwpMswltNbUQgRA8=
13051306
>>>>>>> b1615f1154 (fixing go mods)
1307+
=======
1308+
github.com/smartcontractkit/chainlink-evm v0.0.0-20250623150926-157b4a95d132 h1:gv9AVjP/iQnRFgl59hJVVNQ5FGvtoNJ5K85jAsDGM28=
1309+
github.com/smartcontractkit/chainlink-evm v0.0.0-20250623150926-157b4a95d132/go.mod h1:8ngexcwhlWHLsRSQP7XGyNF5hYDUwpMswltNbUQgRA8=
1310+
>>>>>>> d8d211a50f (adding test fixes and pr review feedback)
13061311
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 h1:8u9xUrC+yHrTDexOKDd+jrA6LCzFFHeX1G82oj2fsSI=
13071312
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135/go.mod h1:NkvE4iQgiT7dMCP6U3xPELHhWhN5Xr6rHC0axRebyMU=
13081313
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250618164021-9b34289a9502 h1:WLgEB8/lIfA1vI+7O4RE/PYitO57TRkKUqVllDIgJD4=

core/services/chainlink/config_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ func TestConfig_Marshal(t *testing.T) {
678678
TransactionManagerV2: evmcfg.TransactionManagerV2Config{
679679
Enabled: ptr(false),
680680
},
681+
ConfirmationTimeout: &minute,
681682
},
682683

683684
HeadTracker: evmcfg.HeadTracker{
@@ -1118,6 +1119,7 @@ MaxQueued = 99
11181119
ReaperInterval = '1m0s'
11191120
ReaperThreshold = '1m0s'
11201121
ResendAfterThreshold = '1h0m0s'
1122+
ConfirmationTimeout = '1m0s'
11211123
11221124
[EVM.Transactions.AutoPurge]
11231125
Enabled = false

core/services/chainlink/testdata/config-full.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ MaxQueued = 99
375375
ReaperInterval = '1m0s'
376376
ReaperThreshold = '1m0s'
377377
ResendAfterThreshold = '1h0m0s'
378+
ConfirmationTimeout = '1m0s'
378379

379380
[EVM.Transactions.AutoPurge]
380381
Enabled = false

core/services/chainlink/testdata/config-multi-chain-effective.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ MaxQueued = 250
358358
ReaperInterval = '1h0m0s'
359359
ReaperThreshold = '168h0m0s'
360360
ResendAfterThreshold = '1m0s'
361+
ConfirmationTimeout = '5m0s'
361362

362363
[EVM.Transactions.AutoPurge]
363364
Enabled = false
@@ -477,6 +478,7 @@ MaxQueued = 250
477478
ReaperInterval = '1h0m0s'
478479
ReaperThreshold = '168h0m0s'
479480
ResendAfterThreshold = '1m0s'
481+
ConfirmationTimeout = '1m0s'
480482

481483
[EVM.Transactions.AutoPurge]
482484
Enabled = false
@@ -590,6 +592,7 @@ MaxQueued = 5000
590592
ReaperInterval = '1h0m0s'
591593
ReaperThreshold = '168h0m0s'
592594
ResendAfterThreshold = '1m0s'
595+
ConfirmationTimeout = '1m0s'
593596

594597
[EVM.Transactions.AutoPurge]
595598
Enabled = false

core/services/relay/evm/evm_service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ func (r *Relayer) SubmitTransaction(ctx context.Context, txRequest evmtypes.Subm
200200

201201
receipt, err := r.chain.TxManager().GetTransactionReceipt(ctx, txID)
202202
if err != nil {
203-
return nil, fmt.Errorf("%w; failed to get TX receipt for tx with ID %s", err, txID)
203+
return nil, fmt.Errorf("failed to get TX receipt for tx with ID %s: %w", txID, err)
204204
}
205205
if receipt == nil {
206-
return nil, fmt.Errorf("%w, receipt was nil for TX with ID %s", err, txID)
206+
return nil, fmt.Errorf("receipt was nil for TX with ID %s: %w", txID, err)
207207
}
208208

209209
return &evmtypes.TransactionResult{

core/services/relay/evm/evm_service_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func runSubmitTransactionTest(t *testing.T, tc SubmitTransactionTestCase) {
111111
func setCommonSubmitTransactionMocks(m *Mocks, ctx any) {
112112
fromAddress := createFromAddress()
113113
m.Workflow.EXPECT().FromAddress().Return(&fromAddress)
114-
m.EVM.EXPECT().ConfirmationTimeout().Return(time.Millisecond)
114+
m.EVM.EXPECT().ConfirmationTimeout().Return(500 * time.Millisecond)
115115
}
116116

117117
func createFromAddress() types.EIP55Address {
@@ -235,11 +235,11 @@ func TestEVMService(t *testing.T) {
235235
ExpectedError: "fail getting transaction status",
236236
},
237237
{
238-
Name: "Success with unconfirmed status and then finalized status",
238+
Name: "Success with pending status and then finalized status",
239239
SetupMocks: func(m *Mocks, ctx any) {
240240
expectedTx := txmgr.Tx{}
241241
m.TxManager.EXPECT().CreateTransaction(ctx, mock.Anything).Return(expectedTx, nil)
242-
m.TxManager.EXPECT().GetTransactionStatus(ctx, mock.Anything).Return(commontypes.Unconfirmed, nil).Once()
242+
m.TxManager.EXPECT().GetTransactionStatus(ctx, mock.Anything).Return(commontypes.Pending, nil).Once()
243243
m.TxManager.EXPECT().GetTransactionStatus(ctx, mock.Anything).Return(commontypes.Finalized, nil).Once()
244244
txHash := common.HexToHash("0xabcd")
245245
mockReceipt := NewChainReceipt(txHash, t)

core/web/resolver/testdata/config-full.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ MaxQueued = 99
375375
ReaperInterval = '1m0s'
376376
ReaperThreshold = '1m0s'
377377
ResendAfterThreshold = '1h0m0s'
378+
ConfirmationTimeout = '1m0s'
378379

379380
[EVM.Transactions.AutoPurge]
380381
Enabled = false

core/web/resolver/testdata/config-multi-chain-effective.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ MaxQueued = 250
358358
ReaperInterval = '1h0m0s'
359359
ReaperThreshold = '168h0m0s'
360360
ResendAfterThreshold = '1m0s'
361+
ConfirmationTimeout = '5m0s'
361362

362363
[EVM.Transactions.AutoPurge]
363364
Enabled = false
@@ -477,6 +478,7 @@ MaxQueued = 250
477478
ReaperInterval = '1h0m0s'
478479
ReaperThreshold = '168h0m0s'
479480
ResendAfterThreshold = '1m0s'
481+
ConfirmationTimeout = '1m0s'
480482

481483
[EVM.Transactions.AutoPurge]
482484
Enabled = false
@@ -590,6 +592,7 @@ MaxQueued = 5000
590592
ReaperInterval = '1h0m0s'
591593
ReaperThreshold = '168h0m0s'
592594
ResendAfterThreshold = '1m0s'
595+
ConfirmationTimeout = '1m0s'
593596

594597
[EVM.Transactions.AutoPurge]
595598
Enabled = false

deployment/go.sum

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,7 @@ github.com/smartcontractkit/chainlink-deployments-framework v0.12.1/go.mod h1:mx
12681268
<<<<<<< HEAD
12691269
<<<<<<< HEAD
12701270
<<<<<<< HEAD
1271+
<<<<<<< HEAD
12711272
>>>>>>> 7c7519f15a (go mod fixes)
12721273
github.com/smartcontractkit/chainlink-evm v0.0.0-20250618173856-d731d7e7468e h1:QBua0Vz42fC3nwzGnaAcUwTp+EnJp5sqiUDjud1UnwE=
12731274
github.com/smartcontractkit/chainlink-evm v0.0.0-20250618173856-d731d7e7468e/go.mod h1:GlSY0cLuXOdaZP8+7pQTezPUwJBW+ExMb5CGby4GGSU=
@@ -1279,6 +1280,10 @@ github.com/smartcontractkit/chainlink-evm v0.0.0-20250619153213-197845c3124d/go.
12791280
github.com/smartcontractkit/chainlink-evm v0.0.0-20250623144418-c3f7dadd73a4 h1:3VskLKO8iVkug1bXz3jG4majt41Mp6PYGJDxQ/nYAFY=
12801281
github.com/smartcontractkit/chainlink-evm v0.0.0-20250623144418-c3f7dadd73a4/go.mod h1:8ngexcwhlWHLsRSQP7XGyNF5hYDUwpMswltNbUQgRA8=
12811282
>>>>>>> b1615f1154 (fixing go mods)
1283+
=======
1284+
github.com/smartcontractkit/chainlink-evm v0.0.0-20250623150926-157b4a95d132 h1:gv9AVjP/iQnRFgl59hJVVNQ5FGvtoNJ5K85jAsDGM28=
1285+
github.com/smartcontractkit/chainlink-evm v0.0.0-20250623150926-157b4a95d132/go.mod h1:8ngexcwhlWHLsRSQP7XGyNF5hYDUwpMswltNbUQgRA8=
1286+
>>>>>>> d8d211a50f (adding test fixes and pr review feedback)
12821287
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 h1:8u9xUrC+yHrTDexOKDd+jrA6LCzFFHeX1G82oj2fsSI=
12831288
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135/go.mod h1:NkvE4iQgiT7dMCP6U3xPELHhWhN5Xr6rHC0axRebyMU=
12841289
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250618164021-9b34289a9502 h1:WLgEB8/lIfA1vI+7O4RE/PYitO57TRkKUqVllDIgJD4=

docs/CONFIG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16247,6 +16247,7 @@ Set to zero to disable.
1624716247
## EVM.Transactions
1624816248
```toml
1624916249
[EVM.Transactions]
16250+
ConfirmationTimeout = '60s' # Default
1625016251
Enabled = true # Default
1625116252
ForwardersEnabled = false # Default
1625216253
MaxInFlight = 16 # Default
@@ -16257,6 +16258,12 @@ ResendAfterThreshold = '1m' # Default
1625716258
```
1625816259

1625916260

16261+
### ConfirmationTimeout
16262+
```toml
16263+
ConfirmationTimeout = '60s' # Default
16264+
```
16265+
ConfirmationTimeout time to wait for a TX to get into a block in the blockchain. This is used for the EVMService.SubmitTransaction operation.
16266+
1626016267
### Enabled
1626116268
```toml
1626216269
Enabled = true # Default

0 commit comments

Comments
 (0)