-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
Corda 4.3 OpenSource
Tokens SDK 1.1
Currently in-memory selection is enabled by default, and to disable it you need to add tokens-selection-1.1.conf under cordapps/config with the following:
stateSelection.inMemory.enabled=false
// You need to supply the below values even when disabling,
// otherwise you'll get a warning.
stateSelection.inMemory.indexingStrategies: ["EXTERNAL_ID"]
stateSelection.inMemory.cacheSize=1024
The above worked fine for me when running nodes locally, but I wasn't able to achieve the same for flow tests.
- Create config:
Map<String, String> selectionConfig = new LinkedHashMap<>();
selectionConfig.put("stateSelection.inMemory.enabled","false");
selectionConfig.put("stateSelection.inMemory.indexingStrategies", "[\"EXTERNAL_ID\"]");
selectionConfig.put("stateSelection.inMemory.cacheSize", "1024");
- Supply config to cordapp:
TestCordapp.findCordapp("com.r3.corda.lib.tokens.selection").withConfig(selectionConfig)
When I run my test in debug mode, I noticed that InMemorySelectionConfig is not able to identify my keys even though they're there. Notice how exists() returns false even though the object config has that value:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels