@@ -25,7 +25,7 @@ import (
25
25
const (
26
26
// defaultEthCallTimeout is the timeout for sets of Ethereum client calls per transaction
27
27
// (i.e. receipt and transaction data)
28
- defaultEthCallTimeout = time .Second
28
+ defaultEthCallTimeout = 30 * time .Second
29
29
)
30
30
31
31
// EthClient is an interface for the Ethereum client operations we need
@@ -129,6 +129,9 @@ func (mw *MessageWatcherEth) update() {
129
129
130
130
// Check if any of the transactions we have assigned are now confirmed
131
131
for _ , txHashStr := range txHashes {
132
+ processed ++
133
+ processStart := time .Now ()
134
+
132
135
txHash := common .HexToHash (txHashStr )
133
136
log .Debugw ("Checking transaction" , "txHash" , txHash .Hex ())
134
137
@@ -244,8 +247,14 @@ func (mw *MessageWatcherEth) update() {
244
247
}
245
248
246
249
confirmed ++
247
- processed ++
248
250
log .Infow ("Successfully confirmed transaction" , "txHash" , txHash .Hex ())
251
+
252
+ processDuration := time .Since (processStart )
253
+ if processDuration > 5 * time .Second {
254
+ log .Warnw ("Transaction processing took longer than expected" ,
255
+ "txHash" , txHash .Hex (),
256
+ "duration" , processDuration )
257
+ }
249
258
}
250
259
251
260
log .Infow ("MessageWatcherEth update completed" ,
0 commit comments