Browse Source

fix zcbenchmarks.cpp

pull/51/head
Duke Leto 5 years ago
parent
commit
c0f350f56f
  1. 12
      src/zcbenchmarks.cpp

12
src/zcbenchmarks.cpp

@ -434,20 +434,20 @@ double benchmark_connectblock_slow()
return duration;
}
extern UniValue getnewaddress(const UniValue& params, bool fHelp); // in rpcwallet.cpp
extern UniValue sendtoaddress(const UniValue& params, bool fHelp);
extern UniValue getnewaddress(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp
extern UniValue sendtoaddress(const UniValue& params, bool fHelp, const CPubKey& mypk);
double benchmark_sendtoaddress(CAmount amount)
{
UniValue params(UniValue::VARR);
auto addr = getnewaddress(params, false);
auto addr = getnewaddress(params, false, CPubKey());
params.push_back(addr);
params.push_back(ValueFromAmount(amount));
struct timeval tv_start;
timer_start(tv_start);
auto txid = sendtoaddress(params, false);
auto txid = sendtoaddress(params, false, CPubKey());
return timer_stop(tv_start);
}
@ -464,14 +464,14 @@ double benchmark_loadwallet()
return res;
}
extern UniValue listunspent(const UniValue& params, bool fHelp);
extern UniValue listunspent(const UniValue& params, bool fHelp, const CPubKey& mypk);
double benchmark_listunspent()
{
UniValue params(UniValue::VARR);
struct timeval tv_start;
timer_start(tv_start);
auto unspent = listunspent(params, false);
auto unspent = listunspent(params, false, CPubKey());
return timer_stop(tv_start);
}

Loading…
Cancel
Save