From bc8e8a74ed89058d8b88f5c3abd7bf5e122b4bf4 Mon Sep 17 00:00:00 2001 From: wonder olabisi Date: Sun, 23 Nov 2025 20:27:29 +0100 Subject: [PATCH] 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 --- accounts/abi/bind/v2/util.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/accounts/abi/bind/v2/util.go b/accounts/abi/bind/v2/util.go index 438848a753..384e45c000 100644 --- a/accounts/abi/bind/v2/util.go +++ b/accounts/abi/bind/v2/util.go @@ -43,7 +43,11 @@ func WaitMined(ctx context.Context, b DeployBackend, txHash common.Hash) (*types if errors.Is(err, ethereum.NotFound) { logger.Trace("Transaction not yet mined") } 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.