Return snapshot info as JSON
This commit is contained in:
@@ -588,21 +588,20 @@ CBlockTreeDB *pblocktree = NULL;
|
||||
#define KOMODO_ZCASH
|
||||
#include "komodo.h"
|
||||
|
||||
int64_t komodo_snapshot()
|
||||
UniValue komodo_snapshot()
|
||||
{
|
||||
fprintf(stderr,"komodo_snapshot\n");
|
||||
int64_t total = -1;
|
||||
UniValue result(UniValue::VOBJ);
|
||||
if (fAddressIndex) {
|
||||
if ( pblocktree != 0 ) {
|
||||
total = pblocktree->Snapshot();
|
||||
result = pblocktree->Snapshot();
|
||||
} else {
|
||||
fprintf(stderr,"null pblocktree start with -addressindex=true\n");
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr,"getsnapshot requires -addressindex=true\n");
|
||||
}
|
||||
fprintf(stderr,"total=%li\n", total);
|
||||
return(total);
|
||||
return(result);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user