Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: BadBunny on December 08, 2015, 12:15:51 AM



Title: Genesis Hash
Post by: BadBunny on December 08, 2015, 12:15:51 AM
I want to try to make an altcoin (not for distributing it) but i can't figure out where to put the genesis hash. For the fork i used librexcoin (https://github.com/librexcoin/librexcoin/blob/master/src/main.cpp).
Can someone help me? Thanks..

EDIT: This is the error
Code:
/LibrexCoind --testnet
LibrexCoind: main.cpp:2542: bool LoadBlockIndex(bool): Assertion `block.GetHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)' failed.
Aborted


Title: Re: Genesis Hash
Post by: iGotSpots on December 08, 2015, 12:55:52 AM
https://github.com/librexcoin/librexcoin/blob/16215cd9258d57e0defac588861365c14b2e4d49/src/main.h#L54 for hash

https://github.com/librexcoin/librexcoin/blob/16215cd9258d57e0defac588861365c14b2e4d49/src/main.cpp#L2499 for the rest


Title: Re: Genesis Hash
Post by: BadBunny on December 08, 2015, 02:32:50 AM
https://github.com/librexcoin/librexcoin/blob/16215cd9258d57e0defac588861365c14b2e4d49/src/main.h#L54 for hash

https://github.com/librexcoin/librexcoin/blob/16215cd9258d57e0defac588861365c14b2e4d49/src/main.cpp#L2499 for the rest

Thanks!
But now i have this

Code:
LibrexCoind: main.cpp:2542: bool LoadBlockIndex(bool): Assertion `block.GetHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)' failed.
Aborted



Title: Re: Genesis Hash
Post by: iGotSpots on December 08, 2015, 03:29:34 AM
I know, that's what the second link is for  ;)


Title: Re: Genesis Hash
Post by: BadBunny on December 08, 2015, 04:24:11 AM
but i have already changed the pszTimestamp , two times, same error.  :-\


Title: Re: Genesis Hash
Post by: BadBunny on December 08, 2015, 02:43:28 PM
tried with different coin, same error. any help?


Title: Re: Genesis Hash
Post by: iGotSpots on December 08, 2015, 05:22:27 PM
Timestamp is not all you need to change in second link


Title: Re: Genesis Hash
Post by: BadBunny on December 08, 2015, 05:42:46 PM
nNonce and nTime, got it!

Problems solved, the error was i diden't deleted the old genesis/merkler hash when i run the first build  ::)

Now i have to try without -testnet and understanding checkpoints.