So, to the point. I used PIVX repo, changed chainparams.cpp accordingly:
- removed old checkpoints;
- generated new keys;
- updated ports all over the codebase;
- changed pchMessageStart numbers;
- updated unixtime;
- changed coin name all over the codebase;
- generated genesis (and it was correct, i checked it many times);
- compiled it;
- launched coind;
- launched cpuminer, and it failed with the following in log:
2019-02-28 16:55:09 ERROR: CheckBlockHeader() : proof of work failed
2019-02-28 16:55:09 ERROR: CheckBlock() : CheckBlockHeader failed
2019-02-28 16:55:09 CreateNewBlock() : TestBlockValidity failed
I re-generated genesis with code in chainparams.cpp - it was the same as with genesis generator. I tried gen=1 and setgenerate true, and again received the same error, and hashespersec=0 in getmininginfo.
I started searching the web, and found a lot of same questions without any answer. For example, this one looks absolutely same - https://bitcoin.stackexchange.com/questions/79767/cannot-mine-genesis-first-block-pivx-fork-clone
I tried the kind of solution from this thread - https://bitcointalk.org/index.php?topic=2152157.0;prev_next=next - but without any success too.
I assumed that maybe i'm missing something, and tried to do the same with some other PIVX forks. The first one was this - https://github.com/IchibaCoin/ICHIBA - with the same error. The second one was this - https://github.com/cruxcoinsource/CruxCoin - with the same error too. Then i scratched my head, thought deeply, and run diff for all files in /src/ folder of both coins with my testcoin. Files were totally same and differed only where they were different between crux and ichiba.
I tried all possible combinations of bools in this part of chainparams.cpp:
fAllowMinDifficultyBlocks = false;
fDefaultConsistencyChecks = false;
fRequireStandard = true;
fMineBlocksOnDemand = false;
fSkipProofOfWorkCheck = false;
fTestnetToBeDeprecatedFieldRPC = false;
fHeadersFirstSyncingActive = false;
And when fMineBlocksOnDemand was set to true, command setgenerate true returned that wallet keypool is empty, and keypoolrefill command had no effect.
What am i doing wrong?..)))
Have you solved it?