test
This commit is contained in:
15
src/komodo.h
15
src/komodo.h
@@ -90,11 +90,13 @@ int32_t komodo_blockindexcheck(CBlockIndex *pindex,uint32_t *nBitsp)
|
|||||||
|
|
||||||
void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
||||||
{
|
{
|
||||||
char *scriptstr; int32_t i,j,k,numvins,numvouts,height,txn_count;
|
char *scriptstr; int32_t iter,i,j,k,numvins,numvouts,height,txn_count,flag=0;
|
||||||
// update voting results and official (height, notaries[])
|
// update voting results and official (height, notaries[])
|
||||||
if ( pindex != 0 )
|
if ( pindex != 0 )
|
||||||
{
|
{
|
||||||
height = pindex->nHeight;
|
height = pindex->nHeight;
|
||||||
|
for (iter=0; iter<13; iter++)
|
||||||
|
{
|
||||||
txn_count = block.vtx.size();
|
txn_count = block.vtx.size();
|
||||||
for (i=0; i<txn_count; i++)
|
for (i=0; i<txn_count; i++)
|
||||||
{
|
{
|
||||||
@@ -103,6 +105,8 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
|||||||
for (j=0; j<numvouts; j++)
|
for (j=0; j<numvouts; j++)
|
||||||
{
|
{
|
||||||
scriptstr = (char *)block.vtx[i].vout[j].scriptPubKey.ToString().c_str();
|
scriptstr = (char *)block.vtx[i].vout[j].scriptPubKey.ToString().c_str();
|
||||||
|
if ( scriptstr[0] != 0 )
|
||||||
|
flag++;
|
||||||
if ( strncmp(scriptstr,CRYPTO777_PUBSECPSTR,66) == 0 )
|
if ( strncmp(scriptstr,CRYPTO777_PUBSECPSTR,66) == 0 )
|
||||||
printf(">>>>>>>> ");
|
printf(">>>>>>>> ");
|
||||||
else if ( i == 0 && j == 0 )
|
else if ( i == 0 && j == 0 )
|
||||||
@@ -122,6 +126,15 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
|||||||
printf("ht.%d txi.%d vout.%d (%s)\n",height,i,j,scriptstr);
|
printf("ht.%d txi.%d vout.%d (%s)\n",height,i,j,scriptstr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( flag != 0 )
|
||||||
|
break;
|
||||||
|
sleep(1);
|
||||||
|
if ( ReadBlockFromDisk(block,pindex,1) == 0 )
|
||||||
|
{
|
||||||
|
printf("error readblock.%d\n",height);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else printf("komodo_connectblock: unexpected null pindex\n");
|
} else printf("komodo_connectblock: unexpected null pindex\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user