Generate JS for trydecryptnotes, make number of addresses a variable

This commit is contained in:
Jack Grigg
2016-12-09 16:55:01 +13:00
parent a513ea90d4
commit 88b7f3c28b
4 changed files with 12 additions and 15 deletions

View File

@@ -224,19 +224,16 @@ double benchmark_large_tx()
return timer_stop(tv_start);
}
double benchmark_try_decrypt_notes(const JSDescription &joinsplit)
double benchmark_try_decrypt_notes(size_t nAddrs)
{
const size_t NUM_ADDRS = 10;
CWallet wallet;
for (int i = 0; i < NUM_ADDRS; i++) {
for (int i = 0; i < nAddrs; i++) {
auto sk = libzcash::SpendingKey::random();
wallet.AddSpendingKey(sk);
}
CMutableTransaction mtx;
mtx.vjoinsplit.push_back(joinsplit);
CTransaction tx(mtx);
auto sk = libzcash::SpendingKey::random();
auto tx = GetValidReceive(*pzcashParams, sk, 10, true);
struct timeval tv_start;
timer_start(tv_start);