Post
Topic
Board Announcements (Altcoins)
Re: ⚓⚓⚓Doubloons⚓⚓⚓ [BOAT] Hybrid PoW/PoS, HMQ1725
by
adroitful_one
on 07/02/2017, 07:25:48 UTC
everytime you restart windows wallet, you need to sync blocks again from beginning  Sad

I noticed this as well.  Something isn't right.  Best to run in a virtualbox for now.  I'm going to take a closer look at the code in the next few hours.

Been trying to figure out how to fix this as well.

The reason it keeps re-syncing is probably because:

Code:

void init_blockindex(leveldb::Options& options, bool fRemoveOld = [b]true[/b]) {
    // First time init.
    filesystem::path directory = GetDataDir() / "txleveldb";

    if (fRemoveOld)
        filesystem::remove_all(directory); // remove directory


if true is set to false, the wallet brings up an error stating "cannot find blkindex.dat"

Setting the value to true was the only option until the real issue can be found...  Huh  

Still trying to figure this out, apologies for any inconvenience!

Just from the snippet you posted there, it looks like at the point it would be trying to pull the block index, it has been directed instead to clear out everything in the /txleveldb directory. When you set it to false, you're essentially telling it the block index simply doesn't exist, because it's coded to launch into clearing /txleveldb.

In other words, you've specified that the location of blockindex is to check and see if you need to remove the location of the block index.
If true, it has been found, and it will proceed to wipe out the directory as instructed and start the vicious cycle over.
If false, it no longer knows where to look for blockindex and gives up.

I understand this may not be the simplest explanation, but it's late and it made sense to me at the time.

I didn't see this earlier, but that's what it looks like to me as well. The boolean name removeold pretty much says everything. If you set that to false it shouldn't remove it