Snapshot roc
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -345,6 +345,7 @@ static const CRPCCommand vRPCCommands[] =
|
||||
{ "addressindex", "getaddressdeltas", &getaddressdeltas, false },
|
||||
{ "addressindex", "getaddresstxids", &getaddresstxids, false },
|
||||
{ "addressindex", "getaddressbalance", &getaddressbalance, false },
|
||||
{ "addressindex", "getsnapshot", &getsnapshot, false },
|
||||
|
||||
/* Utility functions */
|
||||
{ "util", "createmultisig", &createmultisig, true },
|
||||
|
||||
@@ -177,7 +177,8 @@ extern UniValue getaddressmempool(const UniValue& params, bool fHelp);
|
||||
extern UniValue getaddressutxos(const UniValue& params, bool fHelp);
|
||||
extern UniValue getaddressdeltas(const UniValue& params, bool fHelp);
|
||||
extern UniValue getaddresstxids(const UniValue& params, bool fHelp);
|
||||
extern UniValue getaddressbalance(const UniValue& params, bool fHelp);
|
||||
extern UniValue getaddresstxids(const UniValue& params, bool fHelp);
|
||||
extern UniValue getsnapshot(const UniValue& params, bool fHelp);
|
||||
extern UniValue getpeerinfo(const UniValue& params, bool fHelp);
|
||||
extern UniValue ping(const UniValue& params, bool fHelp);
|
||||
extern UniValue addnode(const UniValue& params, bool fHelp);
|
||||
|
||||
Reference in New Issue
Block a user