Bitcoin Forum
November 09, 2024, 03:44:29 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: No chainparams.cpp Clone keeps loading original blockchain  (Read 966 times)
yeahitsme (OP)
Member
**
Offline Offline

Activity: 118
Merit: 11

Growthcoin Developer and Crypto Geek Since 2009


View Profile
February 02, 2017, 05:53:21 PM
Last edit: February 02, 2017, 06:19:24 PM by yeahitsme
 #1

I am learning about how these coins work after getting a bunch of pow clones to work I've moved onto trying to figure out how pow/pos coins work the clone works get connections ect however it keeps trying to piggy back off of the old blockchain however I cant seem to find where it is hiding the previous blockchain data some use a chainparams file this coin does not anyone come across this or know what file the old data would be in to reset it? Thanks in advance


So Im not entirely sure but after looking back through the checkpoints.cpp lots of synccheckpoint calls as well as what caught my eye was

   bool AcceptPendingSyncCheckpoint()
    {
        LOCK(cs_hashSyncCheckpoint);
        if (hashPendingCheckpoint != 0 && mapBlockIndex.count(hashPendingCheckpoint))
        {
            if (!ValidateSyncCheckpoint(hashPendingCheckpoint))
            {
                hashPendingCheckpoint = 0;
                checkpointMessagePending.SetNull();
                return false;
            }

            CTxDB txdb;
            CBlockIndex* pindexCheckpoint = mapBlockIndex[hashPendingCheckpoint];
            if (!pindexCheckpoint->IsInMainChain())
            {
                CBlock block;
                if (!block.ReadFromDisk(pindexCheckpoint))
                    return error("AcceptPendingSyncCheckpoint: ReadFromDisk failed for sync checkpoint %s", hashPendingCheckpoint.ToString().c_str());
                if (!block.SetBestChain(txdb, pindexCheckpoint))
                {
                    hashInvalidCheckpoint = hashPendingCheckpoint;
                    return error("AcceptPendingSyncCheckpoint: SetBestChain failed for sync checkpoint %s", hashPendingCheckpoint.ToString().c_str());
                }
            }
            txdb.Close();



anyone know if this is what is making the chains piggy back is that the wallet still hasnt written a new starting checkpoint at block height 1 or could it possibly be scanning from block 0-w/e there was on the old chain rather than creating a new checkpoint and going from there

Growthco.in    Staking since 2013
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!