This commit is contained in:
jl777
2018-06-12 00:41:46 -11:00
parent 50b11c4a55
commit 67d2e41b3f
3 changed files with 13 additions and 11 deletions

View File

@@ -997,15 +997,15 @@ int32_t komodo_snapshot();
UniValue getsnapshot(const UniValue& params, bool fHelp)
{
UniValue result(UniValue::VOBJ); int32_t num;
UniValue result(UniValue::VOBJ); int64_t total;
if ( fHelp || params.size() > 0 )
{
throw runtime_error(
"getsnapshot\n"
);
}
if ( (num= komodo_snapshot()) >= 0 )
result.push_back(Pair("numaddresses", num));
if ( (total= komodo_snapshot()) >= 0 )
result.push_back(Pair("total", (double)total/COIN));
else result.push_back(Pair("error", "no addressindex"));
return(result);
}