Skip to content

Commit ead82a3

Browse files
Roger Willisroastario
Roger Willis
authored andcommitted
Updated the ERROR to a WARN when an indexing strategy for the in-memory token selection config has not been specified. The message is also now more informative. (#174)
1 parent 45fea66 commit ead82a3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

modules/selection/src/main/kotlin/com.r3.corda.lib.tokens.selection/memory/config/InMemorySelectionConfig.kt

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import co.paralleluniverse.fibers.Suspendable
44
import com.r3.corda.lib.tokens.selection.api.StateSelectionConfig
55
import com.r3.corda.lib.tokens.selection.memory.selector.LocalTokenSelector
66
import com.r3.corda.lib.tokens.selection.memory.services.VaultWatcherService
7-
import com.typesafe.config.ConfigList
8-
import com.typesafe.config.ConfigValue
97
import net.corda.core.cordapp.CordappConfig
108
import net.corda.core.cordapp.CordappConfigException
119
import net.corda.core.node.ServiceHub
@@ -30,10 +28,10 @@ data class InMemorySelectionConfig(val enabled: Boolean,
3028
val indexingType = try {
3129
(config.get("stateSelection.inMemory.indexingStrategies") as List<Any>).map { VaultWatcherService.IndexingType.valueOf(it.toString()) }
3230
} catch (e: CordappConfigException) {
33-
logger.error("Unable to build selection config due to exception during parsing", e)
31+
logger.warn("No indexing method specified. Indexes will be created at run-time for each invocation of selectTokens", e)
3432
emptyList<VaultWatcherService.IndexingType>()
3533
} catch (e: ClassCastException) {
36-
logger.error("Unable to build selection config due to exception during parsing", e)
34+
logger.warn("No indexing method specified. Indexes will be created at run-time for each invocation of selectTokens", e)
3735
emptyList<VaultWatcherService.IndexingType>()
3836
}
3937
logger.info("Found in memory token selection configuration with values indexing strategy: $indexingType, cacheSize: $cacheSize")

0 commit comments

Comments
 (0)