Post
Topic
Board Announcements (Altcoins)
Re: [ANN][FLAP] FlappyCoin ★ REBIRTH ★
by
thimo
on 21/04/2014, 18:18:37 UTC
Okay first problem, it seems the blockchain won't go further than 5999... I see that there's a diffmode change at block 6000


in main.cpp
Code:
unsigned int static GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock)
{
int DiffMode = 1;
if (fTestNet) {
if (pindexLast->nHeight+1 >= 50) { DiffMode = 2; }
}
else {
if (pindexLast->nHeight+1 >= 6000) { DiffMode = 2; } <----- this
}

if (DiffMode == 1) { return GetNextWorkRequired_V1(pindexLast, pblock); }
else if (DiffMode == 2) { return GetNextWorkRequired_V2(pindexLast, pblock); }
return GetNextWorkRequired_V2(pindexLast, pblock);
}

I hope that's not from the original source, that's pretty ugly logic there Sad

That's pretty hard to read code, but getting it to work is top priority of course!

It isn't that bad, it works.

Code:
unsigned int static GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock)
{
if (fTestNet) {
if (pindexLast->nHeight+1 >= 50) {  return GetNextWorkRequired_V2(pindexLast, pblock); }
}

if (pindexLast->nHeight+1 >= 6000) { return GetNextWorkRequired_V2(pindexLast, pblock); }
return GetNextWorkRequired_V1(pindexLast, pblock);
}
Would work as well Wink