Initialize variables in z_getstats correctly

This commit is contained in:
Duke
2023-09-04 08:50:05 -04:00
parent 96ae2d61ca
commit 0f4956dcd5

View File

@@ -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) {