I need help from someone good in source of peercoin.
if (!CheckProofOfStake(pblock->vtx, pblock->nBits, hashProofOfStake))
this CheckProofOfStake goes further to
How do I compute this:
txindex.pos.nTxPos - txindex.pos.nBlockPos whis is txPrev.offset(offset of txPrev inside block)
I cannot read from disk. How do I compute this from the Block? I have found this
unsigned int nTxPos = pindex->nBlockPos + ::GetSerializeSize(CBlock(), SER_DISK, CLIENT_VERSION) - (2 * GetSizeOfCompactSize(0)) + GetSizeOfCompactSize(vtx.size());
but I don't know if this can help me maybe someone can explain
I have found out that timestamp is at offset 4, difficulty is at offset 8, nonce is at offset 12 but txPrev.offset should be an relative number not absolute.