aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-12-09 12:00:10 +0100
committerFlorian Dold <florian@dold.me>2021-12-09 12:00:10 +0100
commit423af144eeca3158fd714cf54710ea042b6a0031 (patch)
treeacbf4a6218c63d45daec20a957115eede3a2b26e /packages/taler-wallet-cli
parentdbfc599540b21da399d94a966ac85b00b339b31a (diff)
put 'setInsecureTrustExchange' behind env variable in benchmark
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r--packages/taler-wallet-cli/src/bench1.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/packages/taler-wallet-cli/src/bench1.ts b/packages/taler-wallet-cli/src/bench1.ts
index c239a3623..1a6a26b6b 100644
--- a/packages/taler-wallet-cli/src/bench1.ts
+++ b/packages/taler-wallet-cli/src/bench1.ts
@@ -56,6 +56,13 @@ export async function runBench1(configJson: any): Promise<void> {
`Starting Benchmark iterations=${numIter} deposits=${numDeposits}`,
);
+ const trustExchange = !!process.env["TALER_WALLET_INSECURE_TRUST_EXCHANGE"];
+ if (trustExchange) {
+ logger.info("trusting exchange (not validating signatures)");
+ } else {
+ logger.info("not trusting exchange (validating signatures)");
+ }
+
let wallet = {} as Wallet;
for (let i = 0; i < numIter; i++) {
@@ -71,7 +78,9 @@ export async function runBench1(configJson: any): Promise<void> {
persistentStoragePath: undefined,
httpLib: myHttpLib,
});
- wallet.setInsecureTrustExchange();
+ if (trustExchange) {
+ wallet.setInsecureTrustExchange();
+ }
await wallet.client.call(WalletApiOperation.InitWallet, {});
}