That's 74 seconds after the timestamp of 24191. My retargeting math has worked for all the previous retargets, so why did this one go wonky? Was there some different logic in place for this block round that allowed a slightly different difficulty retarget? Is this a rounding error (after multiplying the old target by the actual time spent, do I need to truncate it before dividing it out)?
Block 22175 is 74s before block 22176 (time of block 22175 = 1318761208).
This code may be responsible of that :
main.cpp: GetNextWorkRequired line 671
// Go back the full period unless it's the first retarget after genesis. Code courtesy of ArtForz
int nBlocksBack = nInterval-1;
if(pindexLast->nHeight >= hooks->GetFullRetargetStartBlock() && ((pindexLast->nHeight+1) > nInterval))
nBlocksBack = nInterval;
It is related to a bug known as "retarget hole"/timetravel due to merged mining :
https://github.com/namecoin/namecoin/commit/436f571d41cc53844d482eeef0069a3ca94e08f8https://bitcointalk.org/index.php?topic=43719.0https://bitcointalk.org/index.php?topic=43465.0 (first post erased...)
So, after block 19200, go back 2016 instead of 2015.