ArgumentChecker.notNull(configSource, "config source");
ArgumentChecker.notNull(valuationTime, "valuation time");
ArgumentChecker.notNull(conventionSource, "convention source");
ArgumentChecker.notNull(curveNodeCurrencyVisitor, "curve node currency visitor");
final Instant versionTime = valuationTime.plus(1, ChronoUnit.HOURS).truncatedTo(ChronoUnit.HOURS);
final CurveDefinitionSource curveDefinitionSource = new ConfigDBCurveDefinitionSource(configSource);
final Set<Currency> currencies = new TreeSet<>();
for (final CurveGroupConfiguration group : configuration.getCurveGroups()) {
for (final Map.Entry<String, List<CurveTypeConfiguration>> entry : group.getTypesForCurves().entrySet()) {
final String curveName = entry.getKey();
final CurveDefinition curveDefinition = curveDefinitionSource.getCurveDefinition(curveName, VersionCorrection.of(versionTime, versionTime));
if (curveDefinition == null) {
throw new OpenGammaRuntimeException("Could not get curve definition called " + curveName);
}
for (final CurveNode node : curveDefinition.getNodes()) {
currencies.addAll(node.accept(curveNodeCurrencyVisitor));