SeekToFirst

This commit is contained in:
jl777
2018-06-12 02:01:14 -11:00
parent 78a6f7041e
commit 74db3cd027
2 changed files with 3 additions and 0 deletions

View File

@@ -590,6 +590,7 @@ int64_t komodo_snapshot()
int64_t total = -1;
if ( pblocktree != 0 )
total = pblocktree->Snapshot();
else fprintf(stderr,"null pblocktree start with -addressindex=true\n");
return(total);
}

View File

@@ -402,6 +402,8 @@ int64_t CBlockTreeDB::Snapshot()
{
char chType; int64_t total = -1; std::string address;
boost::scoped_ptr<leveldb::Iterator> pcursor(NewIterator());
pcursor->SeekToFirst();
fprintf(stderr,"pcursor iterate\n");
while (pcursor->Valid())
{
boost::this_thread::interruption_point();