Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.setup = async function () {
// see PlenumProtocolVersion or indy-plenum.common.constans.CURRENT_PROTOCOL_VERSION
await sdk.setProtocolVersion(2);
let poolGenesisTxnPath = await exports.getPoolGenesisTxnPath(config.poolName);
let poolConfig = {
"genesis_txn": poolGenesisTxnPath
};
try {
await sdk.createPoolLedgerConfig(config.poolName, poolConfig);
} catch (e) {
if (e.message !== "PoolLedgerConfigAlreadyExistsError") {
throw e;
}
} finally {
pool = await sdk.openPoolLedger(config.poolName);
}
};
exports.setup = async function () {
// see PlenumProtocolVersion or indy-plenum.common.constans.CURRENT_PROTOCOL_VERSION
await sdk.setProtocolVersion(2);
let poolGenesisTxnPath = await exports.getPoolGenesisTxnPath(config.poolName);
let poolConfig = {
"genesis_txn": poolGenesisTxnPath
};
try {
await sdk.createPoolLedgerConfig(config.poolName, poolConfig);
} catch (e) {
if (e.message !== "PoolLedgerConfigAlreadyExistsError") {
throw e;
}
} finally {
pool = await sdk.openPoolLedger(config.poolName);
}
};