Post
Topic
Board Altcoin Discussion
Re: [ANN] StarTrek insipred coins =) and mining links (Low Diff) Nice Bounties!
by
ig0tik3d
on 05/09/2013, 20:59:34 UTC
So how important is the StartT parameter?
Code:
unsigned char GetNfactor(unsigned int nTimestamp) {
    int l = 0;
    if (nTimestamp <= StartT)
        return 4;
    unsigned long int s = nTimestamp - StartT;
    while ((s >> 1) > 3) {
      l += 1;
      s >>= 1;
    }
    s &= 3;
    int n = (l * 170 + s * 25 - 2320) / 100;
    if (n < 0) n = 0;
    if (n > 255)
        printf("GetNfactor(%d) - something wrong(n == %d)\n", nTimestamp, n);
    unsigned char N = (unsigned char)n;
      if(N    if(N>maxNfactor) return maxNfactor;
    return N;
}
if StartT will be wrong, n factor will be calculated wrong ....