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:
parent
146c08d5af
commit
a5223c074a
|
@ -313,7 +313,7 @@ func (e *Watcher) Run(ctx context.Context) error {
|
||||||
|
|
||||||
// Transaction is now ready
|
// Transaction is now ready
|
||||||
if pLock.height+uint64(expectedConfirmations) <= blockNumberU {
|
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)
|
tx, err := c.TransactionReceipt(timeout, pLock.message.TxHash)
|
||||||
cancel()
|
cancel()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue