Help for custom litecoin code


#1

Hi,
i need some help for custom litcoin code.

I need create a new cryptocurrency with last litecoin code .

I clone code to my computer and start modification to chainparams.cpp

i add to ligne 37 : std::cout << genesis.ToString(); (for see a genesis block)
i process to some modification (time, hash …) compilitation working good no error
print console :

CBlock(hash=074032d450910f554743508accc6d0c5e01dff220303cc167e5b65a73af2c925, ver=0x00000001, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=6c5adfb4d3a16fe025c9e5005b529e1f17ae8b6c31669936b7002566fba9fead, nTime=1489130392, nBits=1e0ffff0, nNonce=2084524493, vtx=1)
  CTransaction(hash=6c5adfb4d3, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(0000000000, 4294967295), coinbase 04ffff001d010439417563756e6520646f6e6ec3a96520706572736f6e6e656c6c65206e2765737420656e72656769737472c3a965207375722063652073697465)
    CTxOut(nValue=50.00000000, scriptPubKey=014dac)

i complete :
> assert(consensus.hashGenesisBlock == uint256S(“0x074032d450910f554743508accc6d0c5e01dff220303cc167e5b65a73af2c925”));

    assert(genesis.hashMerkleRoot == uint256S("0x6c5adfb4d3a16fe025c9e5005b529e1f17ae8b6c31669936b7002566fba9fead"));

and compilation again with no error

try to running my file and error :

i see debug file :
end of my debut file
" 2017-03-10 16:12:05 keypool keep 1
2017-03-10 16:12:05 wallet 490ms
2017-03-10 16:12:05 ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8)
2017-03-10 16:12:05 *** Failed to read block
2017-03-10 16:12:05 Error: Error: A fatal internal error occurred, see debug.log for details
2017-03-10 16:12:05 Failed to connect best block
"

i find to internet some guide for custom litecoin code but is for old version many year ago, if you have good tips for custom litcoin new code version ?

Many Thank’s :slight_smile:


#2

Hi there,
I am also facing somewhat same issue, did you find any solution to it. if yes then please can you share it with me.

2017-11-23 10:16:08 init message: Rewinding blocks…
2017-11-23 10:16:08 block index 15ms
2017-11-23 10:16:08 init message: Loading wallet…
2017-11-23 10:16:08 nFileVersion = 150001
2017-11-23 10:16:08 Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total
2017-11-23 10:16:08 Performing wallet upgrade to 60000
2017-11-23 10:16:09 keypool added 2000 keys (1000 internal), size=2000 (1000 internal)
2017-11-23 10:16:09 keypool reserve 1
2017-11-23 10:16:09 keypool keep 1
2017-11-23 10:16:09 wallet 1148ms
2017-11-23 10:16:09 keypool added 1 keys (0 internal), size=2000 (1000 internal)
2017-11-23 10:16:09 setKeyPool.size() = 2000
2017-11-23 10:16:09 mapWallet.size() = 0
2017-11-23 10:16:09 mapAddressBook.size() = 1
2017-11-23 10:16:09 ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8)
2017-11-23 10:16:09 *** Failed to read block

many thanks.