Clean up Digishield for use in Guldencoin.
Removing unused local variable nHeight.
Both nTargetSpacing and nTargetTimespanNEW are defined as 2.5*60, which means that retargetInterval will always equal 1. This means that (pindexLast->nHeight+1) % retargetInterval will always resolve to 0 and therefore the block following if ((pindexLast->nHeight+1) % retargetInterval != 0) will never be ran. Removing the complete block as it is dead code.
Removing the genesis exception, we're never mining a genesis block with DIGI.
Removing the now unused local variables nProofOfWorkLimit and retargetSpacing.
Statement if ((pindexLast->nHeight+1) != retargetInterval) will never be false in oru case. This means blockstogoback is always set to retargetInterval which always equals to 1. This makes for (int i = 0; pindexFirst && i < blockstogoback; i++) utterly useless. Removing it completely.
Removing the now unused local variable retargetInterval.
Setting retargetTimespan to nTargetSpacing (same to nTargetTimespanNEW) and removing the now unused nTargetTimespanNEW.