Browse Source

Initialize variables in z_getstats correctly

pull/321/head
Duke 9 months ago
parent
commit
0f4956dcd5
  1. 4
      src/wallet/rpcwallet.cpp

4
src/wallet/rpcwallet.cpp

@ -3682,8 +3682,8 @@ UniValue z_getstats(const UniValue& params, bool fHelp, const CPubKey& mypk)
if(!ReadBlockFromDisk(block, pblockindex,1))
throw JSONRPCError(RPC_INTERNAL_ERROR, "Can't read block from disk");
int total_ztxs, total_zins, total_zouts = 0;
int largest_zins, largest_zouts = 0;
int total_ztxs = 0, total_zins = 0, total_zouts = 0;
int largest_zins = 0, largest_zouts = 0;
// given a single block height, we calculate stats for that height
if (params.size() == 1) {

Loading…
Cancel
Save