node/pkg/ethereum: reduce timeout for TransactionReceipt

We should spend as little time holding pendingMu as possible.
Ideally, we would refactor the component to do non-blocking I/O.

commit-id:b464c384
This commit is contained in:
Leo 2022-01-10 20:41:29 +01:00 committed by Leopold Schabel
parent 146c08d5af
commit a5223c074a
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ func (e *Watcher) Run(ctx context.Context) error {
// Transaction is now ready
if pLock.height+uint64(expectedConfirmations) <= blockNumberU {
timeout, cancel = context.WithTimeout(ctx, 15*time.Second)
timeout, cancel = context.WithTimeout(ctx, 5*time.Second)
tx, err := c.TransactionReceipt(timeout, pLock.message.TxHash)
cancel()