Author

Topic: Why coind program spit out Assertion error? (Read 132 times)

jr. member
Activity: 413
Merit: 5
April 06, 2018, 01: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.
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
jr. member
Activity: 413
Merit: 5
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
The hash of your genesis block does not match what your software says the genesis block hash should be.
jr. member
Activity: 413
Merit: 5
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?
Jump to: