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