Bitcoin Forum
June 20, 2024, 08:28:53 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Test Coin going wrong  (Read 734 times)
Egoista (OP)
Newbie
*
Offline Offline

Activity: 38
Merit: 0


View Profile
January 08, 2014, 11:18:00 PM
 #1

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,

Quote from: fisheater
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?

Code:
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.
energeez
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
January 09, 2014, 01:40:59 AM
 #2

i've neva had this problem , try to hire a developer about it
best-miner.com
Full Member
***
Offline Offline

Activity: 123
Merit: 100

best-miner.com


View Profile WWW
January 09, 2014, 02:51:43 AM
 #3

Sorry for not help, up for more guys to check

best-miner.com, bitcoin news & bitcoin miners
2T bitcoin miners for 2099$, 34M litecoin miners for 999$,
1T bitcoin miners for 1299$, World wide free shipping with DHL in 1 day.
Egoista (OP)
Newbie
*
Offline Offline

Activity: 38
Merit: 0


View Profile
January 10, 2014, 07:59:51 PM
 #4

Thank you for at least trying. Well now that I see that this doesn't happen very often, I changed it back to what it was to when it actually ran, so now it runs.

So I guess now my question would be: How do I start a new genesis block? What would I have to change?

I need this to test a coin out.

Thanks in advance  Smiley
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!