Author

Topic: No chainparams.cpp Clone keeps loading original blockchain (Read 970 times)

member
Activity: 118
Merit: 11
Growthcoin Developer and Crypto Geek Since 2009
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
Jump to: