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

@@ -2454,8 +2454,7 @@ Value zc_benchmark(const json_spirit::Array& params, bool fHelp)
JSDescription samplejoinsplit;
if (benchmarktype == "verifyjoinsplit" ||
benchmarktype == "trydecryptnotes") {
if (benchmarktype == "verifyjoinsplit") {
CDataStream ss(ParseHexV(params[2].get_str(), "js"), SER_NETWORK, PROTOCOL_VERSION);
ss >> samplejoinsplit;
}
@@ -2482,7 +2481,8 @@ Value zc_benchmark(const json_spirit::Array& params, bool fHelp)
} else if (benchmarktype == "validatelargetx") {
sample_times.push_back(benchmark_large_tx());
} else if (benchmarktype == "trydecryptnotes") {
sample_times.push_back(benchmark_try_decrypt_notes(samplejoinsplit));
int nAddrs = params[2].get_int();
sample_times.push_back(benchmark_try_decrypt_notes(nAddrs));
} else if (benchmarktype == "incnotewitnesses") {
int nTxs = params[2].get_int();
sample_times.push_back(benchmark_increment_note_witnesses(nTxs));