This commit is contained in:
@@ -1464,12 +1464,13 @@ int32_t komodo_is_PoSblock(int32_t slowflag,int32_t height,CBlock *pblock,arith_
|
|||||||
pindex = it != mapBlockIndex.end() ? it->second : NULL;
|
pindex = it != mapBlockIndex.end() ? it->second : NULL;
|
||||||
if ( pindex != 0 && pindex->segid >= -1 )
|
if ( pindex != 0 && pindex->segid >= -1 )
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,"isPoSblock segid.%d\n",pindex->segid);
|
||||||
if ( pindex->segid == -1 )
|
if ( pindex->segid == -1 )
|
||||||
return(0);
|
return(0);
|
||||||
else return(1);
|
else return(1);
|
||||||
}
|
}
|
||||||
txn_count = pblock->vtx.size();
|
txn_count = pblock->vtx.size();
|
||||||
if ( txn_count > 1 && pblock->vtx[txn_count-1].vin.size() == 1 && pblock->vtx[txn_count-1].vout.size() == 1 )
|
if ( txn_count > 1 && pblock->vtx[txn_count-1].vin.size() == 1 && pblock->vtx[txn_count-1].vout.size() == 1 + (ASSETCHAINS_MARMARA!=0) )
|
||||||
{
|
{
|
||||||
it = mapBlockIndex.find(pblock->hashPrevBlock);
|
it = mapBlockIndex.find(pblock->hashPrevBlock);
|
||||||
if ( it != mapBlockIndex.end() && (previndex = it->second) != NULL )
|
if ( it != mapBlockIndex.end() && (previndex = it->second) != NULL )
|
||||||
@@ -1784,6 +1785,7 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
|||||||
bnTarget.SetCompact(pblock->nBits,&fNegative,&fOverflow);
|
bnTarget.SetCompact(pblock->nBits,&fNegative,&fOverflow);
|
||||||
bhash = UintToArith256(hash);
|
bhash = UintToArith256(hash);
|
||||||
possible = komodo_block2pubkey33(pubkey33,pblock);
|
possible = komodo_block2pubkey33(pubkey33,pblock);
|
||||||
|
fprintf(stderr,"checkPoW ht.%d\n",height);
|
||||||
if ( height == 0 )
|
if ( height == 0 )
|
||||||
{
|
{
|
||||||
if ( slowflag != 0 )
|
if ( slowflag != 0 )
|
||||||
@@ -1828,6 +1830,7 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fprintf(stderr,"ASSETCHAINS_STAKED.%d ht.%d\n",ASSETCHAINS_STAKED,height);
|
||||||
if ( ASSETCHAINS_STAKED != 0 && height >= 2 ) // must PoS or have at least 16x better PoW
|
if ( ASSETCHAINS_STAKED != 0 && height >= 2 ) // must PoS or have at least 16x better PoW
|
||||||
{
|
{
|
||||||
if ( (is_PoSblock= komodo_is_PoSblock(slowflag,height,pblock,bnTarget,bhash)) == 0 )
|
if ( (is_PoSblock= komodo_is_PoSblock(slowflag,height,pblock,bnTarget,bhash)) == 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user