code: func NewValidationAuthorityImpl(
  	pc *cmd.PortConfig,
  	resolver bdns.DNSClient,
  	remoteVAs []RemoteVA,
  	maxRemoteFailures int,
  	userAgent string,
  	issuerDomain string,
  	stats metrics.Scope,
  	clk clock.Clock,
  	logger blog.Logger,
  	accountURIPrefixes []string,
  ) (*ValidationAuthorityImpl, error) {
  	if pc.HTTPPort == 0 {
  		pc.HTTPPort = 80
  	}
  	if pc.HTTPSPort == 0 {
  		pc.HTTPSPort = 443
  	}
  	if pc.TLSPort == 0 {
  		pc.TLSPort = 443
  	}
  
  	if features.Enabled(features.CAAAccountURI) && len(accountURIPrefixes) == 0 {
  		return nil, errors.New("no account URI prefixes configured")
  	}
  
  	return &ValidationAuthorityImpl{
  		log:                logger,
  		dnsClient:          resolver,
  		issuerDomain:       issuerDomain,
  		httpPort:           pc.HTTPPort,
  		httpsPort:          pc.HTTPSPort,
  		tlsPort:            pc.TLSPort,
  		userAgent:          userAgent,
  		stats:              stats,
  		clk:                clk,
  		metrics:            initMetrics(stats),
  		remoteVAs:          remoteVAs,
  		maxRemoteFailures:  maxRemoteFailures,
  		accountURIPrefixes: accountURIPrefixes,
  		// singleDialTimeout specifies how long an individual `DialContext` operation may take
  		// before timing out. This timeout ignores the base RPC timeout and is strictly
  		// used for the DialContext operations that take place during an
  		// HTTP-01 challenge validation.
  		singleDialTimeout: 10 * time.Second,
  	}, nil
  }
docs: // NewValidationAuthorityImpl constructs a new VA