This commit is contained in:
jl777
2016-10-30 13:19:51 -03:00
parent 65c873ea53
commit e21335280d

View File

@@ -34,18 +34,18 @@ int32_t komodo_issued_opreturn(uint8_t *shortflagp,char *base,uint256 *txids,uin
base[i] = opretbuf[opretlen-4+i]; base[i] = opretbuf[opretlen-4+i];
if ( strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0 ) // shortflag if ( 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--; opretbuf++, opretlen--;
for (n=len=0; n<opretlen/34; n++) for (n=len=0; n<opretlen/34; n++)
{ {
for (j=0; j<32; j++) for (j=0; j<32; j++)
{ {
((uint8_t *)&txids[n])[j] = opretbuf[len++]; ((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++];
vouts[n] = (opretbuf[len++] << 8) | vouts[n]; 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); return(n);
@@ -94,7 +94,7 @@ void komodo_gateway_deposits(CMutableTransaction *txNew)
txNew->vout[numvouts].scriptPubKey.resize(opretlen); txNew->vout[numvouts].scriptPubKey.resize(opretlen);
script = (uint8_t *)&txNew->vout[numvouts].scriptPubKey[0]; script = (uint8_t *)&txNew->vout[numvouts].scriptPubKey[0];
memcpy(script,opret,opretlen); memcpy(script,opret,opretlen);
//printf("total numvouts.%d %.8f opretlen.%d\n",numvouts,dstr(PENDING_KOMODO_TX),opretlen); printf("total numvouts.%d %.8f opretlen.%d\n",numvouts,dstr(PENDING_KOMODO_TX),opretlen);
} else KOMODO_DEPOSIT = 0; } else KOMODO_DEPOSIT = 0;
} }