Bitcoin Forum
May 07, 2024, 03:09:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why coind program spit out Assertion error?  (Read 109 times)
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 06, 2018, 04:35:40 AM
 #1

I made clone coin,

launched -qt wallet at 2 other VPS, after they sync, start mine from 1, it works well.

Block height become 100~,

so I copy coind file to 3rd VPS, run it like ./coind, (or ./coind -daemon -reindex -txindex)

then suddenly it take 100% cpu, then it spit out this error,

root@q353-2841:~/mycoin# mycoind : main.cpp:2857: bool InitBlockIndex(): Assertion `hash == hashGenesisBlock' failed.

Why this happen? How to fix?
1715051344
Hero Member
*
Offline Offline

Posts: 1715051344

View Profile Personal Message (Offline)

Ignore
1715051344
Reply with quote  #2

1715051344
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715051344
Hero Member
*
Offline Offline

Posts: 1715051344

View Profile Personal Message (Offline)

Ignore
1715051344
Reply with quote  #2

1715051344
Report to moderator
1715051344
Hero Member
*
Offline Offline

Posts: 1715051344

View Profile Personal Message (Offline)

Ignore
1715051344
Reply with quote  #2

1715051344
Report to moderator
1715051344
Hero Member
*
Offline Offline

Posts: 1715051344

View Profile Personal Message (Offline)

Ignore
1715051344
Reply with quote  #2

1715051344
Report to moderator
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6587


Just writing some code


View Profile WWW
April 06, 2018, 04:59:23 AM
 #2

The hash of your genesis block does not match what your software says the genesis block hash should be.

wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 06, 2018, 05:29:08 AM
 #3

The hash of your genesis block does not match what your software says the genesis block hash should be.
How that could be... first 2 VPS I launched run well and each sync with other, and now running well, mining well.

And also I git download from source, and made -qt, run it, it says 8 hours behind, there stops sync.
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6587


Just writing some code


View Profile WWW
April 06, 2018, 06:11:00 AM
 #4

How that could be... first 2 VPS I launched run well and each sync with other, and now running well, mining well.
Reindexing calls different code than a normal start or first start up. It is breaking in the InitBlockIndex function, so go to that function and make sure it is correct. Particularly make sure that that function is creating the correct genesis block (in 0.8 which is what you seem to have forked from, it creates the genesis block independently of the chain params too).

And also I git download from source, and made -qt, run it, it says 8 hours behind, there stops sync.
Qt may also have different code paths than what you thought. Or it just isn't connected to your nodes.



As an aside, you need to stop asking simple debugging questions like these in this forum. We are not your personal support for everything software engineering and Bitcoin cloning related. You should know how to debug simple bugs like this - the source code file and line number where the error occurred are given to you!! You should learn simple software engineering skills and debugging skills before even thinking about making your own altcoin. And even then, you should understand how Bitcoin works before doing so. It is extremely clear that you have no experience with software engineering or debugging software and that you have no knowledge of how Bitcoin works. I ask that you stop asking questions for every single problem you have and instead read documentation and tutorials for working in C++, use some common sense, and do your own research (note research does not mean ask everyone else about problems you are having) first.

wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 06, 2018, 06:50:54 AM
 #5

Thanks, I will keep in mind.
But this phenomenon is I firstly see and can't understand reason, how to fix this.
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!