test
This commit is contained in:
10
src/komodo.h
10
src/komodo.h
@@ -90,12 +90,14 @@ 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,height,txn_count,len;
|
char *scriptstr; int32_t i,j,height,txn_count,len,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;
|
||||||
txn_count = block.vtx.size();
|
txn_count = block.vtx.size();
|
||||||
|
for (j=0; j<3; j++)
|
||||||
|
{
|
||||||
if ( txn_count == 0 )
|
if ( txn_count == 0 )
|
||||||
{
|
{
|
||||||
printf("no transactions for ht.%d\n",height);
|
printf("no transactions for ht.%d\n",height);
|
||||||
@@ -111,10 +113,16 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
|||||||
{
|
{
|
||||||
scriptstr = (char *)block.vtx[i].vout[0].scriptPubKey.ToString().c_str();
|
scriptstr = (char *)block.vtx[i].vout[0].scriptPubKey.ToString().c_str();
|
||||||
len = strlen(scriptstr);
|
len = strlen(scriptstr);
|
||||||
|
if ( len > 0 )
|
||||||
|
flag++;
|
||||||
if ( strncmp(scriptstr,CRYPTO777_PUBSECPSTR,66) == 0 )
|
if ( strncmp(scriptstr,CRYPTO777_PUBSECPSTR,66) == 0 )
|
||||||
printf(">>>>>>>> ");
|
printf(">>>>>>>> ");
|
||||||
printf("ht.%d txi.%d (%s)\n",height,i,scriptstr);
|
printf("ht.%d txi.%d (%s)\n",height,i,scriptstr);
|
||||||
}
|
}
|
||||||
|
if ( flag != 0 )
|
||||||
|
break;
|
||||||
|
sleep(1);
|
||||||
|
}
|
||||||
} else printf("komodo_connectblock: unexpected null pindex\n");
|
} else printf("komodo_connectblock: unexpected null pindex\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user