Move code
This commit is contained in:
@@ -585,6 +585,14 @@ CBlockTreeDB *pblocktree = NULL;
|
|||||||
#define KOMODO_ZCASH
|
#define KOMODO_ZCASH
|
||||||
#include "komodo.h"
|
#include "komodo.h"
|
||||||
|
|
||||||
|
int32_t komodo_snapshot()
|
||||||
|
{
|
||||||
|
int32_t num = -1;
|
||||||
|
if ( pblocktree != 0 )
|
||||||
|
num = pblocktree->Snapshot();
|
||||||
|
return(num);
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// mapOrphanTransactions
|
// mapOrphanTransactions
|
||||||
|
|||||||
@@ -993,6 +993,8 @@ UniValue getaddressbalance(const UniValue& params, bool fHelp)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t komodo_snapshot();
|
||||||
|
|
||||||
UniValue getsnapshot(const UniValue& params, bool fHelp)
|
UniValue getsnapshot(const UniValue& params, bool fHelp)
|
||||||
{
|
{
|
||||||
UniValue result(UniValue::VOBJ); int32_t num;
|
UniValue result(UniValue::VOBJ); int32_t num;
|
||||||
@@ -1002,11 +1004,9 @@ UniValue getsnapshot(const UniValue& params, bool fHelp)
|
|||||||
"getsnapshot\n"
|
"getsnapshot\n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ( pblocktree != 0 )
|
if ( (num= komodo_snapshot()) >= 0 )
|
||||||
{
|
|
||||||
num = pblocktree->Snapshot();
|
|
||||||
result.push_back(Pair("numaddresses", num));
|
result.push_back(Pair("numaddresses", num));
|
||||||
} else result.push_back(Pair("error", "no addressindex"));
|
else result.push_back(Pair("error", "no addressindex"));
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user