test
This commit is contained in:
11
src/main.cpp
11
src/main.cpp
@@ -3200,6 +3200,17 @@ bool CheckBlockHeader(int32_t height,CBlockIndex *pindex, const CBlockHeader& bl
|
|||||||
{
|
{
|
||||||
uint8_t pubkey33[33];
|
uint8_t pubkey33[33];
|
||||||
// Check timestamp
|
// Check timestamp
|
||||||
|
{
|
||||||
|
uint256 hash; int32_t i;
|
||||||
|
hash = blockhdr.GetHash();
|
||||||
|
for (i=0; i<32; i++)
|
||||||
|
fprintf(stderr,"%02x",((uint8_t *)&hash)[i]);
|
||||||
|
fprintf(stderr," <- CheckBlockHeader\n");
|
||||||
|
hash = chainActive.Tip()->GetBlockHash();
|
||||||
|
for (i=0; i<32; i++)
|
||||||
|
fprintf(stderr,"%02x",((uint8_t *)&hash)[i]);
|
||||||
|
fprintf(stderr," <- chainTip\n");
|
||||||
|
}
|
||||||
if (blockhdr.GetBlockTime() > GetAdjustedTime() + 60)
|
if (blockhdr.GetBlockTime() > GetAdjustedTime() + 60)
|
||||||
return state.Invalid(error("CheckBlockHeader(): block timestamp too far in the future"),REJECT_INVALID, "time-too-new");
|
return state.Invalid(error("CheckBlockHeader(): block timestamp too far in the future"),REJECT_INVALID, "time-too-new");
|
||||||
// Check block version
|
// Check block version
|
||||||
|
|||||||
@@ -516,11 +516,11 @@ static bool ProcessBlockFound(CBlock* pblock, CWallet& wallet, CReserveKey& rese
|
|||||||
hash = pblock->hashPrevBlock;
|
hash = pblock->hashPrevBlock;
|
||||||
for (i=0; i<32; i++)
|
for (i=0; i<32; i++)
|
||||||
fprintf(stderr,"%02x",((uint8_t *)&hash)[i]);
|
fprintf(stderr,"%02x",((uint8_t *)&hash)[i]);
|
||||||
fprintf(stderr," <- prev\n");
|
fprintf(stderr," <- prev (stale)\n");
|
||||||
hash = chainActive.Tip()->GetBlockHash();
|
hash = chainActive.Tip()->GetBlockHash();
|
||||||
for (i=0; i<32; i++)
|
for (i=0; i<32; i++)
|
||||||
fprintf(stderr,"%02x",((uint8_t *)&hash)[i]);
|
fprintf(stderr,"%02x",((uint8_t *)&hash)[i]);
|
||||||
fprintf(stderr," <- chainTip\n");
|
fprintf(stderr," <- chainTip (stale)\n");
|
||||||
|
|
||||||
return error("KomodoMiner: generated block is stale");
|
return error("KomodoMiner: generated block is stale");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user