Snapshot roc

This commit is contained in:
jl777
2018-06-12 00:26:46 -11:00
parent bd14699824
commit 2200781907
3 changed files with 20 additions and 1 deletions

View File

@@ -993,6 +993,23 @@ UniValue getaddressbalance(const UniValue& params, bool fHelp)
}
UniValue getsnapshot(const UniValue& params, bool fHelp)
{
UniValue result(UniValue::VOBJ); int32_t num;
if ( fHelp || params.size() > 0 )
{
throw runtime_error(
"getsnapshot\n"
);
}
if ( pblocktree != 0 )
{
num = pblocktree->Snapshot();
result.push_back(Pair("numaddresses", num));
} else result.push_back(Pair("error", "no addressindex"));
return(result);
}
UniValue getaddresstxids(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 1)