diff --git a/ethclient/ethclient.go b/ethclient/ethclient.go index 7290bacc80..f85e167c49 100644 --- a/ethclient/ethclient.go +++ b/ethclient/ethclient.go @@ -305,14 +305,14 @@ func (ec *Client) TransactionInBlock(ctx context.Context, blockHash common.Hash, // TransactionReceipt returns the receipt of a transaction by transaction hash. // Note that the receipt is not available for pending transactions. func (ec *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { - var r *types.Receipt - if err := ec.c.CallContext(ctx, &r, "eth_getTransactionReceipt", txHash); err != nil { - return nil, err - } - if r == nil { - return nil, ethereum.NotFound - } - return r, nil + var r *types.Receipt + if err := ec.c.CallContext(ctx, &r, "eth_getTransactionReceipt", txHash); err != nil { + return nil, err + } + if r == nil { + return nil, ethereum.NotFound + } + return r, nil } // SyncProgress retrieves the current progress of the sync algorithm. If there's