Ht 6000 test

This commit is contained in:
jl777
2018-07-08 16:17:39 -11:00
parent 5aa69f6d75
commit 45ee62cb71
3 changed files with 8 additions and 25 deletions

View File

@@ -1140,15 +1140,16 @@ uint32_t komodo_newstake(int32_t validateflag,arith_uint256 bnTarget,int32_t nHe
{
CBlockIndex *pindex; bool fNegative,fOverflow; uint8_t hashbuf[256]; char address[64]; bits256 addrhash; arith_uint256 hashval; uint256 hash,pasthash; int64_t diff=0; int32_t segid,minage,i,iter=0; uint32_t mfactor=64,txtime,winner = 0; arith_uint256 bnMaxPoSdiff; uint64_t value,coinage,supply = ASSETCHAINS_SUPPLY + nHeight*ASSETCHAINS_REWARD/SATOSHIDEN;
txtime = komodo_txtime(&value,txid,vout,address);
if ( blocktime < prevtime+60 )
blocktime = prevtime+60;
if ( nHeight < 6000 )
{
if ( blocktime < prevtime+60 )
blocktime = prevtime+60;
}
if ( value == 0 || txtime == 0 || blocktime == 0 || prevtime == 0 )
{
//fprintf(stderr,"komodo_stake null %.8f %u %u %u\n",dstr(value),txtime,blocktime,prevtime);
return(0);
}
if ( nHeight < 4400 ) // POSTEST64 change newstake to stake and stake to oldstake and remove
bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow);
mfactor = 1024;
if ( (minage= nHeight*3) > 6000 ) // about 100 blocks
minage = 6000;
@@ -1449,16 +1450,7 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
return(-1);
}
hash = pblock->GetHash();
/*if ( ASSETCHAINS_STAKED == 100 && height >= 4250 && height < 4400 ) // POSTEST64
{
bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow);
fprintf(stderr,"setmindiff ht.%d\n",height);
}
else*/
{
bnTarget.SetCompact(pblock->nBits,&fNegative,&fOverflow);
//fprintf(stderr,"set diff ht.%d slowflag.%d\n",height,slowflag);
}
bnTarget.SetCompact(pblock->nBits,&fNegative,&fOverflow);
bhash = UintToArith256(hash);
possible = komodo_block2pubkey33(pubkey33,pblock);
//fprintf(stderr,"height.%d slowflag.%d possible.%d cmp.%d\n",height,slowflag,possible,bhash > bnTarget);