Hello, I was trying to run an altcoin I compiled but ran into a problem.
According to this guide:
https://bitcointalk.org/index.php?topic=225690.0,
7. Create genesis block. Some people get stuck there, it's really easy:
- find LoadBlockIndex() function, inside, change:
- paraphrase (pszTimestamp) to any recent news phase.
- get the latest unix time (do a google), and put in block.nTime.
- set any nNonce (doesn't really matter)
you can change the time/nonce for testnet too, if you want to use it.
After you are done, save it. Now the genesis block will not match the hash check and merkle root check, it doesn't matter.
The first time you run the compiled code (daemon or qt), it will say "assertion failed". Just exit the program, go to
config dir (under AppData/Roaming), open the debug.log, get the hash after "block.GetHash() = ", copy and paste it to the beginnig of main.cpp, hashGenesisBlock. Also get the merkle root in the same log file, paste it to the ... position in the following code, in LoadBlockIndex()
Quote
assert(block.hashMerkleRoot == uint256("0x..."));
recompile the code, and genesis block created!
BTW, don't forget to change "txNew.vout[0].nValue = " to the coin per block you defined, it doesn't matter to leave as 50, just be consistent with your coin per block (do this before adjust the hash and m-root, otherwise they will be changed again).
I don't see "block.GetHash()=" or the merkle root anywhere in the debug.log. What I get is this?
test version v1.4.0.0-g3aaa7ba-beta ()
Startup time: 01/08/2014 23:09:44
Default data directory /home/egoista/.test
Used data directory /home/egoista/.test
Bound to [::]:51119
Bound to 0.0.0.0:51119
Loading block index...
dbenv.open LogDir=/home/egoista/.test/database ErrorFile=/home/egoista/.test/db.log
a905534d1822824b939b96bc3cfb2453f1474d6e2aa37215f63dfc9c9938713c
0a59605118489aa9cde58e64210d3d56e246758fbabcd1482e54bf4032545221
b5f67295fff9df831521ff194879dac91d25a8594b887041f42d2149bd1d9a73
Has anyone ran into this problem? What was your fix?
Thanks in advance.
EDIT: I suppose that it is also worth mentioning that I am running on Debian Stable.