Test
This commit is contained in:
@@ -876,7 +876,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim
|
|||||||
eligible = komodo_stake(bnTarget,height,block.vtx[txn_count-1].vin[0].prevout.hash,block.vtx[txn_count-1].vin[0].prevout.n,block.nTime,prevtime,(char *)"");
|
eligible = komodo_stake(bnTarget,height,block.vtx[txn_count-1].vin[0].prevout.hash,block.vtx[txn_count-1].vin[0].prevout.n,block.nTime,prevtime,(char *)"");
|
||||||
if ( eligible == 0 || eligible > block.nTime )
|
if ( eligible == 0 || eligible > block.nTime )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"PoS failute ht.%d eligible.%u vs blocktime.%u, lag.%d\n",height,eligible,(uint32_t)block.nTime,(int32_t)(eligible - block.nTime));
|
fprintf(stderr,"PoS failure ht.%d eligible.%u vs blocktime.%u, lag.%d\n",height,eligible,(uint32_t)block.nTime,(int32_t)(eligible - block.nTime));
|
||||||
} else isPoS = 1;
|
} else isPoS = 1;
|
||||||
}
|
}
|
||||||
if ( isPoS == 0 && height > 100 )
|
if ( isPoS == 0 && height > 100 )
|
||||||
|
|||||||
@@ -925,6 +925,12 @@ void static BitcoinMiner()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
CValidationState state;
|
||||||
|
if ( !TestBlockValidity(state, *pblock, chainActive.Tip(), false, false))
|
||||||
|
{
|
||||||
|
//fprintf(stderr,"Invalid block mined, try again\n");
|
||||||
|
return(false);
|
||||||
|
}
|
||||||
if ( NOTARY_PUBKEY33[0] != 0 )
|
if ( NOTARY_PUBKEY33[0] != 0 )
|
||||||
{
|
{
|
||||||
printf("need to wait %d seconds to submit\n",(int32_t)(pblock->nTime - GetAdjustedTime()));
|
printf("need to wait %d seconds to submit\n",(int32_t)(pblock->nTime - GetAdjustedTime()));
|
||||||
@@ -933,12 +939,6 @@ void static BitcoinMiner()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CValidationState state;
|
|
||||||
if ( !TestBlockValidity(state, *pblock, chainActive.Tip(), false, false))
|
|
||||||
{
|
|
||||||
//fprintf(stderr,"Invalid block mined, try again\n");
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
uint256 tmp = pblock->GetHash();
|
uint256 tmp = pblock->GetHash();
|
||||||
int32_t z; for (z=31; z>=0; z--)
|
int32_t z; for (z=31; z>=0; z--)
|
||||||
fprintf(stderr,"%02x",((uint8_t *)&tmp)[z]);
|
fprintf(stderr,"%02x",((uint8_t *)&tmp)[z]);
|
||||||
|
|||||||
Reference in New Issue
Block a user