I can't debug from where I am right now, but:
main.cpp
if (!ComputeNextStakeModifier(pindexNew->pprev, nStakeModifier, fGeneratedStakeModifier))
return error("AddToBlockIndex() : ComputeNextStakeModifier() failed");
pindexNew->SetStakeModifier(nStakeModifier, fGeneratedStakeModifier);
pindexNew->nStakeModifierChecksum = GetStakeModifierChecksum(pindexNew);
if (!CheckStakeModifierCheckpoints(pindexNew->nHeight, pindexNew->nStakeModifierChecksum))
return error("AddToBlockIndex() : Rejected by stake modifier checkpoint height=%d, modifier=0x%016"PRI64x, pindexNew->nHeight, nStakeModifier);
kernel.cpp
bool CheckStakeModifierCheckpoints(int nHeight, unsigned int nStakeModifierChecksum)
{
if (fTestNet) return true;/ Testnet has no checkpoints
if (mapStakeModifierCheckpoints.count(nHeight))
return nStakeModifierChecksum == mapStakeModifierCheckpoints[nHeight];
return true;
}
In other words: The stakehash produced by the mined block is not what it should be, erroring out the code.
Didn't read again the code that generates that checksum, I'm doing it as I post this.
I will continue to examine the code in order to help the developer and the coin.