Search in sources :

Example 1 with ConfigCat

use of duckutil.ConfigCat in project snowblossom by snowblossomcoin.

the class WalletPanel method loadWallet.

private SnowBlossomClient loadWallet(String name, File db_dir, File config_file) throws Exception {
    synchronized (client_map) {
        if (client_map.containsKey(name))
            return client_map.get(name);
    }
    TreeMap<String, String> config_map = new TreeMap<>();
    config_map.put("wallet_path", db_dir.getPath());
    config_map.put("network", ice_leaf.getParams().getNetworkName());
    Config conf = new ConfigCat(new ConfigMem(config_map), new ConfigFile(config_file.getPath()));
    SnowBlossomClient client = new SnowBlossomClient(conf, null, ice_leaf.getStubHolder());
    synchronized (client_map) {
        client_map.put(name, client);
    }
    return client;
}
Also used : ConfigFile(duckutil.ConfigFile) Config(duckutil.Config) SnowBlossomClient(snowblossom.client.SnowBlossomClient) ConfigCat(duckutil.ConfigCat) TreeMap(java.util.TreeMap) ConfigMem(duckutil.ConfigMem)

Aggregations

Config (duckutil.Config)1 ConfigCat (duckutil.ConfigCat)1 ConfigFile (duckutil.ConfigFile)1 ConfigMem (duckutil.ConfigMem)1 TreeMap (java.util.TreeMap)1 SnowBlossomClient (snowblossom.client.SnowBlossomClient)1