|
|
@ -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); |
|
|
|
} |
|
|
|
|
|
|
|