mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
accounts/abi/bind: improve error handling in WaitMined
- Change error logging from Trace to Warn level for better visibility - Add immediate return for context cancellation errors - Helps diagnose transaction receipt retrieval failures
This commit is contained in:
parent
9ac68e288c
commit
bc8e8a74ed
1 changed files with 5 additions and 1 deletions
|
|
@ -43,7 +43,11 @@ func WaitMined(ctx context.Context, b DeployBackend, txHash common.Hash) (*types
|
||||||
if errors.Is(err, ethereum.NotFound) {
|
if errors.Is(err, ethereum.NotFound) {
|
||||||
logger.Trace("Transaction not yet mined")
|
logger.Trace("Transaction not yet mined")
|
||||||
} else {
|
} else {
|
||||||
logger.Trace("Receipt retrieval failed", "err", err)
|
logger.Warn("Receipt retrieval failed", "err", err)
|
||||||
|
// For context cancellation, return immediately
|
||||||
|
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for the next round.
|
// Wait for the next round.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue