This commit is contained in:
jl777
2016-11-07 18:32:02 -03:00
parent 81041ab233
commit 8a8080c5ae

View File

@@ -141,18 +141,18 @@ int32_t komodo_issued_opreturn(uint8_t *shortflagp,char *base,uint256 *txids,uin
base[i] = opretbuf[opretlen-4+i];
if ( (strcmp(base,"KMD") == 0 && ASSETCHAINS_SYMBOL[0] == 0) || strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0 ) // shortflag
{
//printf("BASE.(%s) vs (%s)\n",base,ASSETCHAINS_SYMBOL);
printf("BASE.(%s) vs (%s)\n",base,ASSETCHAINS_SYMBOL);
opretbuf++, opretlen--;
for (n=len=0; n<opretlen/34; n++)
{
for (j=0; j<32; j++)
{
((uint8_t *)&txids[n])[j] = opretbuf[len++];
//printf("%02x",((uint8_t *)&txids[n])[j]);
printf("%02x",((uint8_t *)&txids[n])[j]);
}
vouts[n] = opretbuf[len++];
vouts[n] = (opretbuf[len++] << 8) | vouts[n];
//printf(" issuedtxid v%d i.%d opretlen.%d\n",vouts[n],n,opretlen);
printf(" issuedtxid v%d i.%d opretlen.%d\n",vouts[n],n,opretlen);
}
}
return(n);
@@ -257,7 +257,8 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above
if ( matched != num )
{
printf("matched.%d vs num.%d\n",matched,num);
return(-1);
if ( height > 60000 )
return(-1);
}
}
//printf("opretlen.%d num.%d\n",opretlen,num);
@@ -326,14 +327,14 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
}
else if ( strncmp((char *)"KMD",(char *)&opretbuf[opretlen-4],3) != 0 )
{
if ( ASSETCHAINS_SYMBOL[0] != 0 )
{
for (i=0; i<opretlen; i++)
printf("%02x",opretbuf[i]);
printf(" opret[%c] else path tokomodo.%d\n",opretbuf[0],tokomodo);
}
if ( tokomodo == 0 && opretbuf[0] == 'I' ) // assetchain coinbase
{
if ( ASSETCHAINS_SYMBOL[0] != 0 )
{
for (i=0; i<opretlen; i++)
printf("%02x",opretbuf[i]);
printf(" opret[%c] else path tokomodo.%d\n",opretbuf[0],tokomodo);
}
if ( (n= komodo_issued_opreturn(&shortflag,base,txids,vouts,opretbuf,opretlen)) > 0 && shortflag == ASSETCHAINS_SHORTFLAG )
{
for (i=0; i<n; i++)