Move code

This commit is contained in:
jl777
2018-06-12 00:34:28 -11:00
parent 2200781907
commit 329d80d2c1
2 changed files with 12 additions and 4 deletions

View File

@@ -585,6 +585,14 @@ CBlockTreeDB *pblocktree = NULL;
#define KOMODO_ZCASH
#include "komodo.h"
int32_t komodo_snapshot()
{
int32_t num = -1;
if ( pblocktree != 0 )
num = pblocktree->Snapshot();
return(num);
}
//////////////////////////////////////////////////////////////////////////////
//
// mapOrphanTransactions

View File

@@ -993,6 +993,8 @@ UniValue getaddressbalance(const UniValue& params, bool fHelp)
}
int32_t komodo_snapshot();
UniValue getsnapshot(const UniValue& params, bool fHelp)
{
UniValue result(UniValue::VOBJ); int32_t num;
@@ -1002,11 +1004,9 @@ UniValue getsnapshot(const UniValue& params, bool fHelp)
"getsnapshot\n"
);
}
if ( pblocktree != 0 )
{
num = pblocktree->Snapshot();
if ( (num= komodo_snapshot()) >= 0 )
result.push_back(Pair("numaddresses", num));
} else result.push_back(Pair("error", "no addressindex"));
else result.push_back(Pair("error", "no addressindex"));
return(result);
}