Ejemplo n.º 1
0
static bool CheckNBits(unsigned int nbits1, int64_t time1, unsigned int nbits2, int64_t time2)\
{
    if (time1 > time2)
        return CheckNBits(nbits2, time2, nbits1, time1);
    int64_t deltaTime = time2-time1;

    return CheckMinWork(nbits2, nbits1, deltaTime);
}
Ejemplo n.º 2
0
static bool CheckNBits(unsigned int nbits1, int64_t time1, unsigned int nbits2, int64_t time2)\
{
    if (time1 > time2)
        return CheckNBits(nbits2, time2, nbits1, time1);
    int64_t deltaTime = time2-time1;

    uint256 required;
    required.SetCompact(ComputeMinWork(nbits1, deltaTime));
    uint256 have;
    have.SetCompact(nbits2);
    return (have <= required);
}