Skip to content

Commit

Permalink
FIXED: removed wrong stake modifier checkpiont and added a valid one …
Browse files Browse the repository at this point in the history
…at height 10661
  • Loading branch information
thokon00 committed Jun 7, 2014
1 parent 5a0726c commit ae0c876
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
14 changes: 10 additions & 4 deletions src/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ unsigned int nModifierInterval = MODIFIER_INTERVAL;
static std::map<int, unsigned int> mapStakeModifierCheckpoints =
boost::assign::map_list_of
( 0, 0x0e00670bu )
( 95004, 0x01c6784au )
( 10661, 0xabe9915du )
;

// Get the last stake modifier and its generation time from a given block
Expand Down Expand Up @@ -380,8 +380,14 @@ unsigned int GetStakeModifierChecksum(const CBlockIndex* pindex)
// Check stake modifier hard checkpoints
bool CheckStakeModifierCheckpoints(int nHeight, unsigned int nStakeModifierChecksum)
{
if (fTestNet) return true; // Testnet has no checkpoints
if (mapStakeModifierCheckpoints.count(nHeight))
return nStakeModifierChecksum == mapStakeModifierCheckpoints[nHeight];
if (fTestNet)
return true; // Testnet has no checkpoints
if (mapStakeModifierCheckpoints.count(nHeight)) {
if (fDebug)
printf("CheckStakeModifierCheckpoint: height %d modifier checksum %08x -> %s\n",
nHeight, nStakeModifierChecksum,
nStakeModifierChecksum == mapStakeModifierCheckpoints[nHeight] ? "true" : "false");
return nStakeModifierChecksum == mapStakeModifierCheckpoints[nHeight];
}
return true;
}
11 changes: 7 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2640,29 +2640,30 @@ void PrintBlockTree()
{
for (int i = 0; i < nCol-1; i++)
printf("| ");
printf("|\\\n");
puts("|\\\n");
}
else if (nCol < nPrevCol)
{
for (int i = 0; i < nCol; i++)
printf("| ");
printf("|\n");
puts("|\n");
}
nPrevCol = nCol;

// print columns
for (int i = 0; i < nCol; i++)
printf("| ");
puts("| ");

// print item
CBlock block;
block.ReadFromDisk(pindex);
printf("BLOCK: %d (%u,%u) %s %08x %s mint %7s tx %"PRIszu"",
printf("\nBLOCK: %d (%u,%u) %s %08x %08x %s mint %7s tx %"PRIszu"",
pindex->nHeight,
pindex->nFile,
pindex->nBlockPos,
block.GetHash().ToString().c_str(),
block.nBits,
pindex->nStakeModifierChecksum,
DateTimeStrFormat("%x %H:%M:%S", block.GetBlockTime()).c_str(),
FormatMoney(pindex->nMint).c_str(),
block.vtx.size());
Expand All @@ -2684,6 +2685,8 @@ void PrintBlockTree()
for (unsigned int i = 0; i < vNext.size(); i++)
vStack.push_back(make_pair(nCol+i, vNext[i]));
}

puts("\n");
}

bool LoadExternalBlockFile(FILE* fileIn)
Expand Down

0 comments on commit ae0c876

Please sign in to comment.