CBlockIndex::GetBlockTrust method

From Peercoin Wiki
Jump to: navigation, search



CBigNum CBlockIndex::GetBlockTrust() const
    CBigNum bnTarget;
    if (bnTarget <= 0)
        return 0;
    return (IsProofOfStake()? (CBigNum(1)<<256) / (bnTarget+1) : 1);


Excerpts from the Peercoin white paper

« The hash target that stake kernel must meet is a target per unit coin age (coin-day) consumed in the kernel (in contrast to Bitcoin's proof-of-work target which is a fixed target value applying to every node). Thus the more coin age consumed in the kernel, the easier meeting the hash target protocol. »

« The protocol for determining which competing block chain wins as main chain has been switched over to use consumed coin age. Here every transaction in a block contributes its consumed coin age to the score of the block. The block chain with highest total consumed coin age is chosen as main chain. »



Feel free to add your own questions in this FAQ